Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) used to stand for funerals until the bier was set down, and the people would stand with him; then after that he (peace and blessings be upon him) sat, and he ordered the people to sit as well.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6886