The Messenger of Allah ﷺ gave a sermon in which he mentioned one of his companions who had died and was buried at night, wrapped in an inadequate shroud. The Messenger of Allah ﷺ then forbade burying anyone at night unless absolutely necessary. He said, "When one of you takes charge of his brother's burial, let him shroud him well."
أخبرنا عبد الرحمن بن خالد الرقي القطان ويوسف بن سعيد واللفظ له قال أنبأنا حجاج عن ابن جريج قال أخبرني أبو الزبير أنه سمع
خطب رسول الله ﷺ فذكر رجلا من أصحابه مات فقبر ليلا وكفن في كفن غير طائل فزجر رسول الله ﷺ أن يقبر إنسان ليلا إلا أن يضطر إلى ذلك وقال رسول الله ﷺ إذا ولي أحدكم أخاه فليحسن كفنه
Muslim reported it in Kitab al-Janaiz, chapter titled "On making the shroud of the deceased good," hadith no. 943, from the hadith of Hajjaj bin Muhammad, by this same chain, and it is also found in Kubra, hadith no. 2022.