Sunan an-Nasa'i, Book 1, Hadith 262 (In-Book)

It was narrated that Ibn 'Umar said: "Umar mentioned to the Messenger of Allah that he became Junub at night, and the Messenger of Allah said: 'Perform Wudu' and wash you penis, then sleep.'"

أَخْبَرَنَا قُتَيْبَةُ، عَنْ مَالِكٍ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنِ ابْنِ عُمَرَ، قَالَ ذَكَرَ عُمَرُ لِرَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ تُصِيبُهُ الْجَنَابَةُ مِنَ اللَّيْلِ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ تَوَضَّأْ وَاغْسِلْ ذَكَرَكَ ثُمَّ نَمْ ‏" ‏ ‏.‏

sunnah.com