and they sat around him, still and motionless, as though birds were perched upon their heads—out of respect for the Messenger of Allah ﷺ and reverence for that gathering. He then told them that when death comes to a person, either the angels of mercy descend to him or the angels of punishment. He continued with a lengthy narration, admonishing them thereby. This, then, is the proper form of counsel at the graveside.
As for someone who stands at the grave and speaks as though delivering a sermon, that was never part of the Prophet’s ﷺ practice. It was not his way for a person to stand among the people and address them as if giving a formal sermon; such conduct is not from the sunnah. The sunnah is to do exactly what the Messenger of Allah ﷺ did: if the people are seated and the deceased has not yet been buried, then sit and, while waiting for the burial, speak in the ordinary manner of casual conversation.
Some people have misunderstood the chapter heading adopted by Imam al-Nawawi—may Allah have mercy on him—and, before him, by al-Bukhari in his Sahih, “Chapter: Admonition at the Grave.” They took it to mean that one should become a preacher, raising his voice and addressing the people with “O servants of Allah” and similar expressions used in formal sermons. This is an incorrect and mistaken understanding.