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 ﷺ that he would sometimes become junub in the night. The Messenger of Allah ﷺ said to him, "Do wudu and wash your penis, and then sleep."
أَنَّهُ قَالَ ذَكَرَ عُمَرُ بْنُ الْخَطَّابِ لِرَسُولِ اللَّهِ ﷺ أَنَّهُ يُصِيبُهُ جَنَابَةٌ مِنَ اللَّيْلِ فَقَالَ لَهُ رَسُولُ اللَّهِ تَوَضَّأْ وَاغْسِلْ ذَكَرَكَ ثُمَّ نَمْ