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.
أن رسول الله ﷺ عمر بقبر قد دفن ليلا فقال: متى دفن هذا؟ قالوا: البارحة، قال: أفلا آذنتموني؟ قالوا: دفناه في ظلمة الليل، فكرهنا أن نوقظك، فقام فصففنا خلفه. قال ابن عباس: وأنا فيهم فصلى عليه.
Bukhari narrated it in the Book of Funerals (1321) from Musa bin Ismail, who said, Abdul-Wahid told us, Shaybani told us, from Amir, from Ibn Abbas, who mentioned it.