Hadith 551
It is narrated from Sayyiduna Ali (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) used to stand during funerals. Then, after that, he began to sit.
Hadith 552
وَحَدَّثَنِي ، عَنْ وَحَدَّثَنِي ، عَنْ مَالِك ، أَنَّهُ بَلَغَهُ ، أَنَّ عَلِيَّ بْنَ أَبِي طَالِبٍ " كَانَ يَتَوَسَّدُ الْقُبُورَ وَيَضْطَجِعُ عَلَيْهَا " . قَالَ مَالِك : وَإِنَّمَا نُهِيَ عَنِ الْقُعُودِ عَلَى الْقُبُورِ فِيمَا نُرَى لِلْمَذَاهِبِ
Imam Malik (may Allah have mercy on him) was informed that Sayyiduna Ali (may Allah be pleased with him) used to lean on graves and lie down on them.
Imam Malik (may Allah have mercy on him) said: Sitting on graves is prohibited for the purpose of need, that is, for urinating and defecating.
Hadith 553
Sayyiduna Abu Umamah (may Allah be pleased with him) used to say: When we attended funerals, even the last person would not sit down without permission.