Hadith 211

نا أَحْمَدُ بْنُ عَبْدَةَ ، أَخْبَرَنَا سُفْيَانُ ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ ، عَنِ ابْنِ عُمَرَ ، عَنْ عُمَرَ ، أَنَّهُ سَأَلَ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : أَيَنَامُ أَحَدُنَا وَهُوَ جُنُبٌ ؟ قَالَ : " يَنَامُ وَيَتَوَضَّأُ إِنْ شَاءَ "
It is narrated from Sayyiduna Umar (may Allah be pleased with him) that he asked the Messenger of Allah (peace and blessings be upon him), "Can any one of us sleep in a state of janabah (major ritual impurity)?" The Prophet (peace and blessings be upon him) said: "He can sleep, and if he wishes, he may perform ablution."
Hadith Reference صحيح ابن خزيمه / جماع أبواب فضول التطهير والاستحباب من غير إيجاب / 211
Hadith Takhrij صحيح مسلم