Hadith 1658

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.)

وَعَنِ ابْنِ عَبَّاسٍ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَرَّ بِقَبْرٍ دُفِنَ لَيْلًا فَقَالَ: «مَتَى دُفِنَ هَذَا؟» قَالُوا: الْبَارِحَةَ. قَالَ: «أَفَلَا آذَنْتُمُونِي؟» قَالُوا: دَفَنَّاهُ فِي ظُلْمَةِ اللَّيْلِ فَكَرِهْنَا أَنْ نُوقِظَكَ فَقَامَ فَصَفَفْنَا خَلفه فصلى عَلَيْهِ

Reference: 5616580
In-book reference: Book 5, Hadith 1658