Al-Ilmam bi-Ahadith al-Ahkam 100
وَرَوَى مَالك عَن عبد الله بن دِينَار، عَن عبد الله بن عمر رَضِيَ اللَّهُ عَنْه، أَنه قَالَ: ذكر عمر بن الْخطاب رَضِيَ اللَّهُ عَنْه لرَسُول الله ﷺ أَنه تصيبه الْجَنَابَة من اللَّيْل؛ فَقَالَ لَهُ رَسُول الله ﷺ ﷺ: " تَوَضَّأ واغسل ذكرك، ثمَّ نَمْ ". أَخْرجُوهُ إِلَّا التِّرْمِذِيّ.
Malik narrated, from ʿAbdullah ibn Dinar, from ʿAbdullah ibn ʿUmar, may Allah be pleased with him, that he said: ʿUmar ibn al-Khattab, may Allah be pleased with him, mentioned to the Messenger of Allah ﷺ that he becomes junub during the night. The Messenger of Allah ﷺ said to him: "Perform wudu and wash your private part, then sleep." They reported it, except at-Tirmidhi.