The view of Imam al-Shaafa'i and Imam Ahmad is that if a person falls into a coma in Ramadaan, one of the following two scenarios must apply:
1 - The coma lasts all day, i.e., he is unconscious from before dawn until after the sun sets. In this case his fast is not valid, and he must make up this day after Ramadaan.
The evidence that his fast is not valid is that fasting means abstaining from things that invalidate the fast, with the intention of doing so, because Allaah says in the hadeeth qudsi that the fasting person gives up his food, his drink and his desire for My sake. (Narrated by al-Bukhaari, 1894; Muslim, 1151). So the abstention is connected to the prior intention on the part of the fasting person, and this cannot apply to one who is in a coma.
The evidence that the fast must be made up later on is the verse in which Allaah says (interpretation of the meaning):
and whoever is ill or on a journey, the same number [of days which one did not observe Sawm (fasts) must be made up] from other days
2 - He is awake for part of the day, if only for a moment. In this case his fast is valid, whether he woke up at the beginning of the day, at the end or in the middle.
Al-Nawawi (may Allaah have mercy on him) said, mentioning the different scholarly opinions on this matter:
The most correct view says that this is subject to the condition that he be awake for a part of the day.
i.e., the soundness of the unconscious person's fasts depends on his being awake for part of the day.
The evidence for his fast being sound if he is awake for part of the day is that he has consciously abstained from things that break the fast in general.
See Haashiyat Ibn Qaasim ala al-Rawd al-Muraaba', 3/381
So to sum up, the answer is that if a man is unconscious for the entire day - i.e., from dawn until sunset - his fast is not valid, and he has to make up the fasts he missed. If he was awake for part of the day, then his fast is valid. This is the view of al-Shaafa'i and Ahmad, and was the view favoured by Shaykh Ibn Uthaymeen (may Allaah have mercy on him).
See al-Majmoo', 6/346; al-Mughni, 4/344; al-Sharh al-Mumti', 6/365
And Allaah knows best.
Reproduced from Islam QA