The Messenger of Allah ﷺ said, "It is not right for any Muslim man who has something to bequeath to spend two nights without having his will written and kept with him."
حدثنا إسحق بن منصور أخبرنا عبد الله بن نمير حدثنا عبيد الله بن عمر عن نافع
أن رسول الله ﷺ قال ما حق امرئ مسلم يبيت ليلتين وله شيء يوصي فيه إلا ووصيته مكتوبة عنده
Agreed upon (by Bukhari and Muslim). Muslim also narrated it in the Book of Bequests, chapter "A Man's Bequest Being Written Down With Him," hadith no. 1627, from the narration of Ibn Numayr, and Bukhari narrated it as hadith no. 2738, from the narration of Nafi with the same wording. There is also a narration on this subject from Ibn Abu Awfa [Bukhari, no. 4460, and Muslim, no. 1634].