Praise be to Allah.
Yes, his fasting is valid.
The scholars are agreed that if a fasting person wakes up during the day, even if it is for a single moment, then his fasting is valid, but if he does not wake up and he sleeps all day whilst fasting, then the majority of scholars say that his fasting is still valid, because sleep does not invalidate fasting, as it does not mean that he is completely unconscious, rather if someone wakes him he will wake up.
See al-Majmoo’, 6/346; al-Mughni, 4/344
The Standing Committee was asked about that and replied:
If the matter is as mentioned, then the fast is valid but for a fasting person to spend most of the day asleep is a kind of negligence on his part, especially since the month of Ramadaan is a special time and the Muslim should strive to benefit from it by reading Qur’aan a great deal, seeking provision and acquiring knowledge.
And Allaah is the Source of strength. May Allaah send blessings and peace upon our Prophet Muhammad and his family and companions.
Al-Lajnah al-Daa’imah li’l-Buhooth al-‘Ilmiyyah, 10/212
The following is the advice of Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allaah have mercy on him) to those who are fasting and others to make the most of their time and not to waste it sleeping. He said:
There is nothing wrong with sleeping during the day or the night, so long as that does not lead to missing out on any of the obligatory duties or committing any haraam action. What is prescribed for the Muslim, whether he is fasting or not, is not to stay up late at night, and to hasten to sleep after doing whatever he is able to of qiyaam al-layl, then he should get up for suhoor if it is Ramadaan, because eating suhoor is a confirmed Sunnah as the Prophet (peace and blessings of Allaah be upon him) said, “Eat suhoor, for in suhoor there is barakah (blessing).” (Saheeh – agreed upon).
And the Prophet (peace and blessings of Allaah be upon him) said: “The thing that differentiates between our fasting and the fasting of the People of the Book is eating suhoor.” Narrated by Muslim in his Saheeh.
Those who are fasting and others must also adhere to offering the five daily prayers in congregation, and avoid being distracted from them by sleep or anything else. Those who are fasting and others must also do all their duties on time for the government or other duties, and not be distracted from them by sleep or anything else. And they must strive to seek halaal provision which they and their dependents need, and not be distracted from that by sleep or anything else.
In conclusion, my advice to everyone, men and women, those who are fasting and those who are not, is to fear Allaah in all situations, and to continue to perform duties on time in the manner enjoined by Allaah, and to avoid being distracted from that by sleep or any other permissible thing etc. If the thing that distracts them from that is an act of disobedience towards Allaah, then the sin is greater and more serious.
May Allaah guide the Muslims, enable them to understand their religion and make them steadfast in adhering to the truth, and guide their leaders, for He is Most Generous, Most Kind.
Fataawa al-Shaykh Ibn Baaz, 4/15.