Abdullah bin Abbas reported,

The Messenger of Allah ﷺ passed by a grave that had been buried at night and asked, "When was this person buried?"They replied, "Last night."He said, "Why did you not inform me?"They answered, "We buried him in the darkness of the night and disliked waking you."So he stood, and we formed rows behind him. Ibn Abbas said, "I was among them," and he prayed over the deceased.

Azami 3696

Sahih

عن ابن عباس

أن رسول الله ﷺ عمر بقبر قد دفن ليلا فقال: متى دفن هذا؟ قالوا: البارحة، قال: أفلا آذنتموني؟ قالوا: دفناه في ظلمة الليل، فكرهنا أن نوقظك، فقام فصففنا خلفه. قال ابن عباس: وأنا فيهم فصلى عليه.

الأعظمي 3696صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Prayer over the deceased
Section
Rows of boys with men in funeral prayers
Numbering
Jami al-Kamil 3696 (2nd edition)
Azami 3696