Sayyiduna Awf bin Malik (may Allah be pleased with him) said: I offered a funeral prayer with the Messenger of Allah (peace and blessings be upon him), and I understood the supplication he made for him; it was: 'Allahummaghfir lahu warhamhu wa'fu anhu wa afihi, wa akrim nuzulahu, wa wassi' alayhi mudkhalahu, waghsilhu bi-ma'i baradin aw thalj, wa naqqihi minal-khataya kama yunaqqath-thawbul-abyadu minad-danas, Allahumma abdilhu daran khayran min darihi, wa zawjan khayran min zawjihi, wa ahlan khayran min ahlihi, wa qihi fitnatal-qabri wa adhaban-nar' (O Allah, forgive him and have mercy on him, pardon him and grant him well-being, elevate his station and make his grave spacious, wash him with the water of hail or snow, and cleanse him of sins as a white garment is cleansed of dirt. O Allah, exchange his home for a better home, his spouse for a better spouse and his family for a better family, and protect him from the trial of the grave and the punishment of Hell.) Sayyiduna Awf (may Allah be pleased with him) said: I wished that I were the one whose funeral this was.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6968