The World Federation One Stop Fiqh

Ruling 1598

If someone is junub on a night of the month of Ramadan and is certain or confident that if he goes to sleep he will wake up before the time of ṣubḥ prayers, in the event that he decides to perform ghusl after waking up and goes to sleep with this decision but remains asleep until the time of ṣubḥ prayers, his fast is valid.