On whom the obligatory prayers are binding and from whom they are lifted
This is because all the rulings of the Shariah apply only to the one who is held accountable (mukallaf), as narrated from Aisha (may Allah be pleased with her) that the Prophet ﷺ said: “The sin is not recorded for three people.”
عن النائم حتى يستيقظ وعن الصبى حتى يحتلم وعن المجنون حتى يعقل
“The sleeper until he wakes up, the child until he reaches puberty, and the insane person until he becomes sane.”
Remember that when the sleeper wakes up, or the one who forgot remembers, it will be necessary for them to perform the act of worship they missed, as stated in the hadith.
من نام عن صلاة أو نسيها فليصلها إذا ذكرها
“When someone oversleeps a prayer or forgets it, let him pray it when he remembers it.”
As for the hadith in which children are commanded to pray before puberty, the obligation in it is not on the children but on the parents, to train their children, as the Messenger of Allah ﷺ commanded the parents:
مروا أولادكم بالصلاة وهم أبناء سبع سنين واضربوهم عليها وهم أبناء عشر سنين
“Command your children to pray when they are seven years old, and when they are ten years old, make them pray by striking them.”
The one who is unable to pray even by gesture, or who falls unconscious until the time of the prayer ends, the prayer is lifted from him
The following evidences are sufficient to understand this issue:
➊ فَاتَّقُوا اللهَ مَا اسْتَطَعْتُمْ
“Fear Allah as much as you are able.”
➋ لَا يُكَلِّفُ اللهُ نَفْسًا إِلَّا وُسْعَهَا
“Allah does not burden any soul beyond its capacity.”
➌ رَبَّنَا وَلَا تُحَمِّلْنَا مَالَا طَاقَةَ لَنَا
“Our Lord! Do not place on us a burden that we have no strength to bear.”
➍ It is a hadith of the Prophet ﷺ: إذا أمـرتـكـم بـأمر فاتوا منه ما استطعتم “When I command you to do something, do of it as much as you are able.”
➎ This is also established in the principles (of jurisprudence): لا يحوز التكليف بالمستحيل “Burdening with the impossible is not permissible.”
The prayer is not obligatory on such a person because in such a state he is not held accountable at all, since only one who has understanding can be held accountable, as has passed in the previous authentic hadith: رفع القـلـم عـن ثلاثة…. عن المجنون حتى يعقل “The sin is not recorded for three people… the insane person until he becomes sane.”
It is also established in the principles that understanding is a condition for the validity of accountability.
And that is absent in this person, because an unconscious person is incapable of understanding anything.
The sick person should pray standing (if he is not able to, then sitting; if he is not able to do even that, then lying on his side)
It is narrated from Imran ibn Husayn (may Allah be pleased with him) that he said: I had hemorrhoids. I asked the Prophet ﷺ about prayer (in this condition), so he ﷺ said:
اصل قائما فإن لم تستطع فقاعدا فإن لم تستطع فعلي جنب
“Pray standing; if you are not able to, then sitting; and if you are not able to do even that, then lying on your side.”
In a narration from Ali (may Allah be pleased with him) these words are added:
فإن لم يستطع أن يصلى على جنبه الأيمن صلى مستلقيا رجلاه ممايلي القبلة
“If a person is not able to pray lying on his right side, let him pray lying on his back with his feet toward the qiblah.”
If the sick person is not able to pray in any of these ways, he should pray however he is able, because a person is held accountable only for what he is able to do, as has just been mentioned above.
(The majority) Lying on the side means that he should lie on his right side.
(Abu Hanifa, may Allah have mercy on him) Its meaning is that he should lie on his back and turn his feet toward the qiblah.
(The preferred view) The view of the majority is the preferred one.
◈ A further explanation of the actions that are prohibited during the prayer can be found in باب شروط الصلاة.