It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him): "When one of you follows a funeral, let him take hold of all four sides of the bier; then after that let him do more as a voluntary good deed, or leave it, for indeed this is the Sunnah."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6834