كتاب الحيض
3  
The Book of Menstruation
(6)
Chapter: It is permissible for one who is junub to sleep, but it is recommended for him to perform wudu’, and wash his private parts if he wants to eat, drink, sleep, or have intercourse
(6)
باب جَوَازِ نَوْمِ الْجُنُبِ وَاسْتِحْبَابِ الْوُضُوءِ لَهُ وَغَسْلِ الْفَرْجِ إِذَا أَرَادَ أَنْ يَأْكُلَ أَوْ يَشْرَبَ أَوْ يَنَامَ أَوْ يُجَامِعَل
Sahih Muslim 306 c

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 306c
In-book reference : Book 3, Hadith 26
USC-MSA web (English) reference : Book 3, Hadith 602
  (deprecated numbering scheme)