It is narrated from Sayyiduna Umar (may Allah be pleased with him) that once I asked the Messenger of Allah (peace and blessings be upon him): If any one of us becomes impure and wants to sleep before performing ghusl, what should he do? The Prophet (peace and blessings be upon him) said: "He should perform ablution as for prayer and then go to sleep."
Hadith Referenceمسند احمد / مسند الخلفاء الراشدين / 94