Sa'id bin al-Musayyib narrates: I was present with Ibn Umar (may Allah be pleased with them both) at a funeral. When he placed the deceased in the lahd (niche of the grave), he said: "Bismillah, wa fi sabilillah, wa 'ala millati Rasulillah (In the name of Allah, in the path of Allah, and upon the religion of the Messenger of Allah (peace and blessings be upon him))." Then, when they began placing the bricks over the lahd, he said: "O Allah, protect the deceased from Satan and from the punishment of the grave." Then, when they had levelled the earth, he stood at the side of the grave and said: "O Allah, make the earth spacious around the deceased's sides, raise the soul high, and grant the deceased Your good pleasure." I asked: Are these things you heard from the Messenger of Allah (peace and blessings be upon him), or are you saying them from your own opinion? He said: "I am indeed capable of speaking (on my own if I wished), but rather I heard them from the Messenger of Allah (peace and blessings be upon him)."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13038