Muhammad bin Sirin said that Sayyiduna Ibn Mas'ud (may Allah be pleased with him) said: "If I went to my wife at the beginning of the night, then reached the morning in a state of janabah, I would fast, because I went to her while she was lawful for me."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9536