I heard from Mas'ud b. al-Hakam who narrated it on the authority of Hadrat 'Ali that he said: We saw the Prophet ﷺ stood up for a (bier) and we also stood up; he sat down and we too sat down.
رَأَيْنَا رَسُولَ اللَّهِ ﷺ قَامَ فَقُمْنَا وَقَعَدَ فَقَعَدْنَا يَعْنِي فِي الْجَنَازَةِ