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 owes someone a right, then two nights should not pass over him in such a way that his will is not written and kept with him."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 5930