(Imām Bukhārī narrates): Qutaibah narrated to us, he said: Laith narrated to us, from Nafi', from Hazrat Ibn Umar (may Allāh be pleased with both of them), from Hazrat Umar bin Al-Khattab (may Allāh be pleased with him),
he asked the Messenger of Allāh ﷺ: Can any of us sleep in a state of janabah? He said: Yes! When any of you performs wudu, he may sleep in a state of janabah.
حَدَّثَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ عُمَرَ بْنَ الْخَطَّابِ،
سَأَلَ رَسُولَ اللَّهِ صلى الله عليه وسلم أَيَرْقُدُ أَحَدُنَا وَهْوَ جُنُبٌ قَالَ " نَعَمْ إِذَا تَوَضَّأَ أَحَدُكُمْ فَلْيَرْقُدْ وَهُوَ جُنُبٌ ".
Reference: Sahih Al Bukhari 287