(Imām Bukhārī narrates): Abdullah bin Yusuf narrated to us, he said: Imam Malik informed us, from Abdullah bin Dinar, from Hazrat Abdullah bin Umar (may Allāh be pleased with both of them), he said that
Hazrat Umar bin Al-Khattab mentioned to the Messenger of Allāh ﷺ that he becomes in a state of janabah at night; the Messenger of Allāh ﷺ said to him: Perform wudu and wash your private part, then sleep.
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ
أَنَّهُ قَالَ ذَكَرَ عُمَرُ بْنُ الْخَطَّابِ لِرَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ تُصِيبُهُ الْجَنَابَةُ مِنَ اللَّيْلِ، فَقَالَ لَهُ رَسُولُ اللَّهِ صلى الله عليه وسلم " تَوَضَّأْ وَاغْسِلْ ذَكَرَكَ ثُمَّ نَمْ "
Reference: Sahih Al Bukhari 290