(6) باب جَوَازِ نَوْمِ الْجُنُبِ وَاسْتِحْبَابِ الْوُضُوءِ لَهُ وَغَسْلِ الْفَرْجِ إِذَا أَرَادَ أَنْ يَأْكُلَ أَوْ يَشْرَبَ أَوْ يَنَامَ أَوْ يُجَامِعَل
Ibn Umar reported:
Umar b. al-Khattab said to the Messenger of Allah (ﷺ), that he became Junbi during the night. The Messenger of Allah (ﷺ) said to him: Perform ablution, wash your sexual organ and then go to sleep.
Reference: Sahih Muslim 306 c
In-book reference: Book 3, Hadith 26
USC-MSA web (English) reference(deprecated numbering scheme): Book 3, Hadith 602