The Messenger of Allah ﷺ said, "It is not right for any Muslim who has something to bequeath to spend even two nights without having his will written and kept with him."Muhammad bin Muslim corroborated it from Amr, from Ibn Umar, from the Prophet ﷺ.
حدثنا عبد الله بن يوسف أخبرنا مالك عن نافع
أن رسول الله ﷺ قال ما حق امرئ مسلم له شيء يوصي فيه يبيت ليلتين إلا ووصيته مكتوبة عنده تابعه محمد بن مسلم عن عمرو عن ابن عمر عن النبي ﷺ