Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said that the Messenger of Allah (peace and blessings be upon him) offered the funeral prayer over a deceased person three days after his death. Isma'il bin Zakariyya narrates with the same chain that he prayed over a grave two nights after the burial.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7003