The Messenger of Allah ﷺ said, "Whoever follows the funeral of a Muslim man, seeking reward from Allah, and prays over it and buries it, will receive two qirats. Whoever prays over it and then returns before it is buried will return with one qirat of reward."
أخبرنا محمد بن بشار قال حدثنا محمد بن جعفر عن عوف عن محمد بن سيرين
أن رسول الله ﷺ قال من تبع جنازة رجل مسلم احتسابا فصلى عليها ودفنها فله قيراطان ومن صلى عليها ثم رجع قبل أن تدفن فإنه يرجع بقيراط من الأجر