He went to the Prophet ﷺ and said: Sometimes I become junub. He told him to wash his private parts and do wudoo’ as for prayer (i.e., then go to sleep, and do ghusl before Fajr).
أَنَّهُ أَتَى النَّبِيَّ ﷺ فَقَالَ إِنَّهُ تُصِيبُنِي الْجَنَابَةُ فَأَمَرَهُ أَنْ يَغْسِلَ ذَكَرَهُ وَيَتَوَضَّأَ وُضُوءَهُ لِلصَّلاةِ