كتاب الجنائز
5  
Funerals
(5a)
Chapter: Walking at a Funeral and Prayer over the Dead - Section 1
(5)
المشي بالجنازة والصلاة عليها - الفصل الأول
Mishkat al-Masabih 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 : Mishkat al-Masabih 1658
In-book reference : Book 5, Hadith 133