`Umar bin Al-Khattab told Allah's Messenger (ﷺ), "I became Junub at night." Allah's Messenger (ﷺ) replied, "Perform ablution after washing your private parts and then sleep."
Sahih al-Bukhari Book 5, Hadith 42