The Prophet ﷺ entered a grave at night, and a lamp was lit for him. He took the deceased from the direction of the qiblah and said, "May Allah have mercy on you. You were given to humble supplication and devoted to reciting the Quran." Then he made four takbirs over him.
حدثنا أبو كريب ومحمد بن عمرو السواق قالا حدثنا يحيى بن اليمان عن المنهال بن خليفة عن الحجاج بن أرطاة عن عطاء
أن النبي ﷺ دخل قبرا ليلا فأسرج له سراج فأخذه من قبل القبلة وقال رحمك الله إن كنت لأواها تلاء للقرآن وكبر عليه أربعا
No references are available.
[Its chain of transmission is daif]. Bayhaqi graded it daif. Hajjaj bin Artah is daif and a mudallis. Ibn Majah also related it, no. 1520, in abbreviated form, without the verbal wording attributed to the Prophet, and it is a hasan hadith.There is also a narration on this subject from Jabir [Ibn Majah, no. 1521] and Yazid bin Thabit [Ibn Majah, no. 1528].