Hadith 214

نا أَبُو مُوسَى ، حَدَّثَنِي مُحَمَّدُ بْنُ جَعْفَرٍ ، حَدَّثَنَا شُعْبَةُ ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ ، قَالَ : سَمِعْتُ ابْنَ عُمَرَ ، يَقُولُ : سَأَلَ عُمَرُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ تُصِيبُنِي الْجَنَابَةُ بِاللَّيْلِ فَمَا أَصْنَعُ ؟ قَالَ : " اغْسِلْ ذَكَرَكَ وَتَوَضَّأْ ، ثُمَّ ارْقُدْ "
Hazrat Abdullah bin Dinar (may Allah have mercy on him) says that I heard Sayyiduna Ibn Umar (may Allah be pleased with them both) saying that Sayyiduna Umar (may Allah be pleased with him) asked the Messenger of Allah (peace and blessings of Allah be upon him): "I become junub (in a state of major ritual impurity) at night, so what should I do?" The Prophet (peace and blessings of Allah be upon him) said: "Wash your private parts and perform wudu, then go to sleep."
Hadith Reference صحيح ابن خزيمه / جماع أبواب فضول التطهير والاستحباب من غير إيجاب / 214
Hadith Takhrij صحيح بخاري