Muwatta Malik, Book 2, Hadith 113 (In-Book)

Yahya related to me from Malik from Ismail ibn Abi Hakim from Sulayman ibn Yasar that Umar ibn al-Khattab went out early in the morning to his land in al-Juruf and found semen on his garment. He said, "I have been tried with wet dreams since I have been entrusted with governing the people." He did ghusl and washed his garment of what he saw of the semen, and then prayed after the sun had risen.

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

sunnah.com

also referenced under: Book 2, Hadith 83 (USC-MSA)