It is narrated from Sayyidah Umm Salamah (may Allah be pleased with her); she said that the Messenger of Allah (peace and blessings be upon him) would reach the morning in a state of major ritual impurity (janabah), not from a wet dream, then he would take a ritual bath (ghusl) and continue his fast.
Hadith Referenceالمعجم الكبير للطبراني / مسند النساء / 19885