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: "It is the right of every Muslim that three nights should not pass in such a way that his will is not written and kept with him."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 4578