كتاب الطهارة
2  
Purity

Yahya related to me from Malik from Abdullah ibn Dinar that Abdullah ibn Umar related that Umar ibn al-Khattab mentioned to the Messenger of Allah, may Allah bless him and grant him peace, that he would sometimes become junub in the night. The Messenger of Allah, may Allah bless him and grant him peace, said to him, "Do wudu and wash your penis, and then sleep."

حَدَّثَنِي يَحْيَى، عَنْ مَالِكٍ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، أَنَّهُ قَالَ ذَكَرَ عُمَرُ بْنُ الْخَطَّابِ لِرَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ يُصِيبُهُ جَنَابَةٌ مِنَ اللَّيْلِ فَقَالَ لَهُ رَسُولُ اللَّهِ ‏ "‏ تَوَضَّأْ وَاغْسِلْ ذَكَرَكَ ثُمَّ نَمْ ‏"‏ ‏.‏
USC-MSA web (English) reference : Book 2, Hadith 78
Arabic reference : Book 2, Hadith 108