Yazid bin Thabit (may Allah be pleased with him) said: We went out with the Messenger of Allah (peace and blessings be upon him) to al-Baqi', and he (peace and blessings be upon him) saw a new grave and asked about it. The Companions told him, and he (peace and blessings be upon him) recognised the person. He (peace and blessings be upon him) said: "Why did you not inform me?" It was said: You (peace and blessings be upon him) were asleep, so we did not think it right to trouble you (peace and blessings be upon him). He (peace and blessings be upon him) said: "Do not do that. As long as I am among you, let me not find that any of you has died without your informing me, for my prayer over him is a mercy for him." Then he (peace and blessings be upon him) came to the grave and offered the funeral prayer; we formed rows behind him (peace and blessings be upon him), and he (peace and blessings be upon him) said four takbirs.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7018