Can praying for unbelievers who have passed away bring comfort to those who are grieving?

Can praying for unbelievers who have passed away bring comfort to those who are grieving?