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 Sahih Muslim 306 c
Arabic hadith text
حَدَّثَنِي يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنِ ابْنِ عُمَرَ، قَالَ ذَكَرَ عُمَرُ بْنُ الْخَطَّابِ لِرَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ تُصِيبُهُ جَنَابَةٌ مِنَ اللَّيْلِ فَقَالَ لَهُ رَسُولُ اللَّهِ صلى الله عليه وسلم "تَوَضَّأْ وَاغْسِلْ ذَكَرَكَ ثُمَّ نَمْ "
Translation
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.