How to pray when lying down
Question

                How should a person pray when he is lying down, on his side or on his back? How should he say the takbeer (“Allahu akbar”), bow and prostrate, and recite the tashahhud? How should he gesture?
Praise be to Allah.Firstly:
With regard to a worshipper praying when lying down, there are two scenarios:
The first scenario:
The prayer is obligatory, and the worshipper is able to stand or sit. In this case, his prayer is not valid if it is offered whilst lying down, according to scholarly consensus, because the Prophet (blessings and peace of Allah be upon him) said to ‘Imraan ibn Husayn, when he was sick: “Pray standing; if you cannot do that then pray sitting; if you cannot do that then pray on your side.” Narrated by al-Bukhaari (1117).
Ibn ‘Abd al-Barr (may Allah have mercy on him) said:
This confirms that standing (in the prayer) is obligatory and is not waived except when one is unable to do it. The same applies to sitting, if one is not able to do it, and so on and so forth. Things are waived when one is unable to do them until, when a person reaches the state of unconsciousness, all of that is waived.
End quote from at-Tamheed (1/135).
The second scenario:
The prayer is voluntary, in which case it is permissible for the worshipper to pray sitting, even though he is able to stand, but his reward will be half of the reward of one who prays standing.
Al-Qaadi ‘Iyaad (may Allah have mercy on him) said:
The entire hadith has to do with someone offering a voluntary prayer, because it says that it is “better” [to stand] when one is able to stand, but he chooses to sit.
End quote from Ikmaal al-Mu‘allim (3/77).
This has been discussed previously in the answer to question no. 9307.
Secondly:
Is it permissible to offer a voluntary prayer lying down, when one is able to sit?
Most of the scholars are of the view that that is not permissible.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
Most of the scholars denounced that and regarded it as an innovation that has been introduced into Islam. They said: it is not known that anyone in Islam ever prayed lying on his side when he was in sound health. If that were allowed, the Muslims would have done that at the time of their Prophet (blessings and peace of Allah be upon him) or after that, and the Prophet (blessings and peace of Allah be upon him) would have done that, even if only once, to show that it is permissible. He used to offer voluntary prayers sitting, and would pray on his mount, facing whatever direction the mount was facing, and he would pray Witr on his mount, but he did not offer any obligatory prayer on his mount. If that were acceptable, he would have done it, even if only once, or his companions would have done it.
End quote from Majmoo‘ al-Fataawa (23/235).
Some scholars regard it as permissible to offer voluntary prayers lying down. That was narrated from al-Hasan al-Basri, and it is one view in the Maaliki, Shaafa‘i and Hanbali madhhabs. Their evidence for that is the general meaning of the hadith of ‘Imraan ibn Husayn, who said: I asked the Prophet (blessings and peace of Allah be upon him) about a man praying whilst sitting, and he said: “Whoever prays standing, that is better. Whoever prays sitting will have half the reward of the one (who prays) standing. And the one who prays ‘sleeping’ will have half the reward of the one (who prays) sitting.”
Narrated by al-Bukhaari (1116). He said: What is meant by ‘sleeping’ here is lying down. End quote.
According to the view that it is permissible in that case, then lying down takes the place of standing only, and the worshipper must sit up in order to bow and prostrate, and he should lean forward for bowing, and prostrate if he is able to do so.
An-Nawawi (may Allah have mercy on him) said:
Ar-Raafi‘i said: If we assume that it is permissible to offer voluntary prayers lying down, when a person is able to stand, then is it sufficient to gesture only for bowing and prostrating?  Or is it stipulated that he should bow and prostrate like one who prays sitting?
There are two views, the more sound of which is the second. Imam al-Haramayn said: In our view, those who say that it is permissible to pray lying down do not say that it is permissible to limit oneself, when saying essential dhikrs of the prayer, such as the tashahhud, takbeer and so on, to saying them in the heart only without moving the lips.
It is essential to note what Imam al-Haramayn said: it is definitely not sufficient to say the words only in one’s heart, because in that case there will be nothing left of the outward form of the prayer. Rather the hadith points out that there is a concession with regard to standing and sitting only; all other parts of the prayer remain as they are usually done. And Allah knows best.
End quote from al-Majmoo‘ (3/276).
Al-Mirdaawi al-Hanbali (may Allah have mercy on him) said:
He said that it is not valid to pray lying down, whilst Ibn Haani’ narrated that it is valid to do so, and some of the scholars favoured that view.
Then (we may ask) can he gesture or must he prostrate? There are two views, the first of which is that he should prostrate. I say: This is the apparent meaning of the words of al-Majd in his commentary and elsewhere, and it is the correct view.
End quote from al-Furoo‘ wa Tasheeh al-Furoo‘ (2/400).
Thirdly:
If the worshipper is not able to pray standing or sitting, then it is permissible for him to pray lying down in the case of both obligatory and voluntary prayers, because of the hadith of ‘Imraan ibn Husayn quoted above.
With regard to the one who has no choice but to pray lying down, the validity of his prayer is based on two important principles:
The first principle is that the Muslim is only obliged to do what he is able to do.
Allah, may He be exalted, says (interpretation of the meaning):
“Allah does not burden any soul with more than it can bear”
[al-Baqarah 2:286]
“So fear Allah as much as you are able”
[at-Taghaabun 64:16].
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
Whoever examines the texts of the Qur’an and Sunnah, it will become clear to him that the obligation to do religious duties depends on one’s ability to learn and act. If someone is incapable of doing either, then what is beyond him is waived in his case, for Allah does not burden any soul with more than it can bear.… Hence the Prophet (blessings and peace of Allah be upon him) said to ‘Imraan ibn Husayn: “Pray standing; if you cannot do that then pray sitting; if you cannot do that then pray on your side.”
End quote from Majmoo‘ al-Fataawa (21/634).
The second principle is that the one who is able to do and say what is required of him is obliged to do it, and it is not waived in his case. The principle according to the scholars is that what one is able to do cannot be waived because of what one is not able to do.
‘Izz ad-Deen ibn ‘Abd as-Salaam (may Allah have mercy on him) said:
The principle is that the one who has a religious duty to do and is able to do some of it and unable to do some of it must do what he is able to do, and what he is unable to do is waived in his case…
End quote from Qawaa‘id al-Ahkaam (2/7)
Conclusion:
The one who has no choice but to pray lying down may pray on his side, and if he is not able to do that, then he may pray lying on his back and gesture with his head for bowing and prostration. If he is not able to do that, then he should pray intending those movements in his heart, and he should recite the words of dhikr verbally.
The same applies to the tashahhud and takbeer. If he is able to raise his hands (when saying takbeer) and to move his finger (when reciting the tashahhud), then he must do that, otherwise it is sufficient to say the words.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
The Prophet (blessings and peace of Allah be upon him) said to ‘Imraan ibn Husayn: “… if you cannot do that then pray on your side.” He did not state which side it should be, so we say that he has the choice between lying on his right side or his left side.
The best is for him to do whatever is easiest for him. If both sides are the same for him, then the right side is better. The Prophet (blessings and peace of Allah be upon him) liked to start with the right when putting on his shoes, combing his hair, purifying himself, and in all his affairs.
If he prays lying on his back, with his feet towards the qiblah, that is valid…
The second view is that it is not valid if he is able to lie on his side, because the Prophet (blessings and peace of Allah be upon him) said to ‘Imraan ibn Husayn: “…if you cannot do that then pray on your side.” This position is specifically referred to in the religious text, and is better than lying on one’s back, because the face of the sick person can face the qiblah, whereas if he is lying on his back, his face will be facing upwards. So if he is lying on his side, it is easier for him to face the qiblah. This view is the correct one.
So in order of preference, the options for the sick person when praying are as follows:
He should pray standing, but if he is not able to do that then he should pray sitting. If he is not able to pray sitting, then he should pray lying on his side, and if he is not able to do that then he should pray lying on his back with his feet towards the qiblah. The latter is the fourth option according to the correct view.
If he is lying on his side, then he may gesture for bowing and prostration.
But how should he gesture? Should he gesture with his head towards the ground, like one who is turning his head, or should he gesture with his head tilting it towards his chest?
The answer is that he should tilt his head towards his chest, because tilting it towards the ground is a kind of turning away from the qiblah, unlike tilting it towards his chest, because in that case he is still facing towards the qiblah. So his gesture when he is lying down should be done by tilting his head slightly towards his chest for bowing and a little more than that for prostration.
If he is not able to do that, then there are three scholarly views:
The first view is that if he is unable to gesture with his head, he should gesture with his eyes.
The second view is that the actions of the prayer are waived in his case, but the words are not waived.
The third view is that both the words and the actions are waived in his case; in other words he does not have to pray at all. This view was favoured by Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him).
The correct view out of these three is the view that only the actions of the prayer are waived in this case, because they are what he is unable to do. The words of the prayer are not waived, because he is able to say them, and Allah, may He be exalted, says (interpretation of the meaning):
“So fear Allah as much as you are able”
[at-Taghaabun 64:16].
So we say that he should say takbeer, recite Qur’an, intend to bow, say takbeer, recite the tasbeeh of bowing, then intend to stand up and say, Sami‘a Allahu liman hamidah Rabbana wa laka al-hamd (Allah hears those who praise Him; our Lord to You be praise)”, then intend to prostrate, say takbeer, say the tasbeeh of prostration, because this is in accordance with the shar‘i guideline: “So fear Allah as much as you are able” [at-Taghaabun 64:16].
If a person is unable to speak or do the actions of prayer, such as if he is paralysed and unable to speak, what should he do?
The answer is that both the words and the actions are waived in his case, but there remains the intention. So he should intend that he is praying, and intend to recite, and intend to bow, prostrate, stand up and sit down.
This is the correct view, because the prayer is words and actions done with the intention. If the words and actions are waived because one is unable to do them, what remains is the intention. Moreover, if we say to the sick person that he does not have to pray, this may be a cause of his forgetting Allah, because if a day and night pass without him praying, he may end up forgetting Allah, may He be glorified and exalted. But if we keep reminding him to pray, and he has to do it even if it is by means of intention alone, that is better than telling him that he does not have to pray.
End quote from ash-Sharh al-Mumti‘ (4/328-332).
And Allah knows best.