Aisha, the wife of the Apostle of Allah (may peace be upon him), said: The dawn broke upon the Messenger of Allah (may peace be upon him) during the Ramadan in a state of junub not because of sexual dream (but on account of intercourse) and he washed himself and observed fast.

Sulaiman b. Yasar reported that he asked Umm Salama whether a person (who gets up) in the morning in a state of junub should observe fast. She said: The Messenger of Allah (may peace be upon him) (at times) got up in the morning in a state of junub, not because of sexual dreams (but on account of intercourse at night), and then observed fast.
Sahih Muslim,The book of Fasting