Saeed bin Musayab reported,

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 ﷺ."

Ibn Majah 1553

Daif

حدثنا هشام بن عمار حدثنا حماد بن عبد الرحمن الكلبي حدثنا إدريس الأودي

عن سعيد بن المسيب قال

حضرت ابن عمر في جنازة فلما وضعها في اللحد قال بسم الله وفي سبيل الله وعلى ملة رسول الله فلما أخذ في تسوية اللبن على اللحد قال اللهم أجرها من الشيطان ومن عذاب القبر اللهم جاف الأرض عن جنبيها وصعد روحها ولقها منك رضوانا قلت يا ابن عمر أشيء سمعته من رسول الله أم قلته برأيك قال إني إذا لقادر على القول بل شيء سمعته من رسول الله ﷺ

ابن ماجه 1553ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Funerals
Chapter
Placing the deceased in the grave
Numbering
Darussalam 1553
Ibn Majah 1553