It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "If a person has any right of a Muslim upon him, then three nights should not pass in such a way that his will is not written and kept with him."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 4902