As for the ruling of the person in a state of major ritual impurity (junub) at night, the Shaykh (Al-Mufid), may Allah سبحانه وتعالى have mercy on him, mentioned: “Whoever becomes in a state of major ritual impurity (ajnaba), then sleeps with the intention that he will perform the ritual bath (ghusl) before dawn, but sleep continues with him until the rising of dawn, then there is no making up nor expiation upon him. Rather, he performs the ritual bath and fasts. If he wakes up, then sleeps a second time and intends to perform the ritual bath before dawn, but sleep continues with him until the rising of dawn, then upon him is making up the fast without expiation. If he sleeps a third time, then upon him are making up the fast and expiation.” As for that which indicates the first category, it is what he narrated (in the following hadith):
Commentary #6