Full Sharh — Mishkat al-Masabih 1575
وَعَنِ ابْنِ عَبَّاسٍ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَرَّ بِقَبْرٍ دُفِنَ لَيْلًا فَقَالَ: «مَتَى دُفِنَ هَذَا؟» قَالُوا: الْبَارِحَةَ. قَالَ: «أَفَلَا آذَنْتُمُونِي؟» قَالُوا: دَفَنَّاهُ فِي ظُلْمَةِ اللَّيْلِ فَكَرِهْنَا أَنْ نُوقِظَكَ فَقَامَ فَصَفَفْنَا خَلفه فصلى عَلَيْهِ
English Translation
Ibn ‘Abbas said that God's messenger came upon a grave where an interment had taken place at night and asked when this person had been buried. On being told that he had been buried the previous night, he asked why they had not informed him. They told him that they had conducted the burial in the darkness of night and had not liked to waken him, whereupon he stood up, and when they formed a row behind him he prayed over the dead. (Bukharl and Muslim.)
Source
Mishkat al-Masabih(مشكاة المصابيح)
Funerals
Hadith Number
1575