The Prophet ﷺ gave a sermon one day in which he mentioned a man from among his companions who had passed away, was shrouded in a poor-quality shroud, and was buried at night. The Prophet ﷺ forbade burying a person at night before the funeral prayer is performed over him, unless someone is compelled by necessity to do so. The Prophet ﷺ then said, "When one of you shrouds his brother, let him do so well."
حدثنا أحمد بن حنبل حدثنا عبد الرزاق أخبرنا ابن جريج عن أبي الزبير أنه سمع
عن النبي ﷺ أنه خطب يوما فذكر رجلا من أصحابه قبض فكفن في كفن غير طائل وقبر ليلا فزجر النبي ﷺ أن يقبر الرجل بالليل حتى يصلى عليه إلا أن يضطر إنسان إلى ذلك وقال النبي ﷺ إذا كفن أحدكم أخاه فليحسن كفنه
Muslim narrated it in the Book of Funerals, Chapter on making the shroud of the deceased good, no. 943, from the hadith of Ibn Jurayj, through this route, and it is also found in Musnad Ahmad, 3/295.