Sayyiduna Jabir bin Abdullah (may Allah be pleased with him) said that one day the Prophet (peace and blessings be upon him) addressed us and mentioned one of his Companions who had died and was not given a good shroud, and was buried at night. So the Prophet (peace and blessings be upon him) rebuked this and said: "Do not bury (anyone) at night until the funeral prayer has been offered over him, unless there is some necessity." And the Prophet (peace and blessings be upon him) said: "When one of you shrouds his brother, let him shroud him well."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6917