The Messenger of Allah ﷺ said, "It is not right for a Muslim man who has something to bequeath to spend even two nights without having his will written down with him."
حدثنا علي بن محمد حدثنا عبد الله بن نمير عن عبيد الله بن عمر عن نافع
قال رسول الله ﷺ ما حق امرئ مسلم أن يبيت ليلتين وله شيء يوصي فيه إلا ووصيته مكتوبة عنده
Reported by Muslim, chapter on Wills, section on a man's will being written down and kept with him, hadith no. 1627, from the hadith of Ibn Numayr, with this wording. Reported by Bukhari, chapter on Wills, section on Wills, hadith no. 2738, from the hadith of Malik, with this wording.