It is narrated on the authority of Abu Sa'id al-Khudri that the Holy Prophet (ﷺ) said: Whenever you come across a bier you should stand up, and he who follows it should not sit down till it is placed on the ground.
Hadith ReferenceSahih Muslim / The Book of Prayer - Funerals / Hadith: 959