كتاب الحيض
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 b

Ibn 'Umar said:

'Umar asked the verdict of the Shari'ah from the Apostle (ﷺ) thus: Is it permissible for any one of us to sleep in a state of impurity? He (the Prophet said: Yes, he must perform ablution and then sleep and take a bath when he desires.
وَحَدَّثَنَا مُحَمَّدُ بْنُ رَافِعٍ، حَدَّثَنَا عَبْدُ الرَّزَّاقِ، عَنِ ابْنِ جُرَيْجٍ، أَخْبَرَنِي نَافِعٌ، عَنِ ابْنِ عُمَرَ، أَنَّ عُمَرَ، اسْتَفْتَى النَّبِيَّ صلى الله عليه وسلم فَقَالَ هَلْ يَنَامُ أَحَدُنَا وَهُوَ جُنُبٌ قَالَ ‏ "‏ نَعَمْ لِيَتَوَضَّأْ ثُمَّ لْيَنَمْ حَتَّى يَغْتَسِلَ إِذَا شَاءَ ‏"‏ ‏.‏
Reference : Sahih Muslim 306b
In-book reference : Book 3, Hadith 25
USC-MSA web (English) reference : Book 3, Hadith 601
  (deprecated numbering scheme)