Sayyiduna Ubadah bin al-Samit (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) used to remain standing until the deceased was placed in the lahd (niche of the grave). Then a Jewish scholar passed by and said: "We also do likewise." So the Messenger of Allah (peace and blessings be upon him) sat and said: "Sit, and differ from them."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6890