The Prophet ﷺ passed by a freshly dug grave and said, "Two short rakahs of the kind you belittle and treat as optional, added to this man's record of deeds, would be more beloved to him than all that remains of your worldly life."
مر النبي ﷺ على قبر دفن حديثا فقال: ركعتان خفيفتان مما تحقرون وتنفلون يزيدهما هذا في عمله أحب إليه من بقية دنياكم.
No references are available.
Ibn Sayd narrated it in his additions to Zuhd of Ibn Mubarak (31), and Tabarani in Al-Awsat (924), and Abu Naeem in Akhbar Isbahan (2/225), all of them through various routes from Hafs bin Ghiyath, from Abu Malik Ashjai, from Abu Hazim, from Abu Hurairah, who mentioned it.Its chain is hasan. It contains Hafs bin Abdullah Halwani, of whom Abu Hatim said, "Saduq [truthful]." Ibn Sayd also graded it hasan, as did Munziri in Targheeb (571).