I attended a funeral with Ibn Umar. When he placed the deceased into the grave niche, he said, "In the name of Allah, in the path of Allah, and upon the religion of the Messenger of Allah."When he began arranging the bricks over the niche, he said, "O Allah, shield her from Satan and from the punishment of the grave. O Allah, keep the earth away from her sides, raise up her soul, and grant her acceptance from You."I said, "Ibn Umar, is this something you heard from the Messenger of Allah, or did you say it from your own opinion?"He replied, "I would indeed be capable of composing such words, but rather it is something I heard from the Messenger of Allah ﷺ."
حدثنا هشام بن عمار حدثنا حماد بن عبد الرحمن الكلبي حدثنا إدريس الأودي
حضرت ابن عمر في جنازة فلما وضعها في اللحد قال بسم الله وفي سبيل الله وعلى ملة رسول الله فلما أخذ في تسوية اللبن على اللحد قال اللهم أجرها من الشيطان ومن عذاب القبر اللهم جاف الأرض عن جنبيها وصعد روحها ولقها منك رضوانا قلت يا ابن عمر أشيء سمعته من رسول الله أم قلته برأيك قال إني إذا لقادر على القول بل شيء سمعته من رسول الله ﷺ
Its chain is daif. Bayhaqi (4/55) narrated it via Ibn Adi, from the hadith of Hisham, with this wording. Busiri said its chain contains Hammad bin Abdul-Rahman, whose weakness is agreed upon, and his teacher Idris bin Sabih is unknown (Taqrib).