Whoever has some excuse due to illness and cannot stand during the obligatory Prayer is allowed to pray sitting. If he cannot pray in a sitting posture, he may pray while on his side by making gestures, or even while on his back if he cannot lie on his side.

Elaborating more on this, we cite what Sheikh Sayyed Sabiq states in his well-known book, Fiqh Us-Sunnah: Whoever has some excuse due to illness and cannot stand during the obligatory Prayer is allowed to pray sitting. If he cannot pray in a sitting posture, he may pray while on his side by making gestures. In such a case, his gestures for sujud (prostration) should be lower than those for his ruku` (bowing). This principle is based on Allah’s words: (And celebrate Allah’s praises, standing, sitting, and lying on your sides) (An-Nisaa’ 4:103)

`Imran ibn Husayn reported: I had piles [hemorrhoids], so I asked the Prophet (peace and blessings be upon him) about the Prayer and he said, “Offer the Prayer while standing and if you cannot do so, pray while sitting, and if you can’t do that, then offer Prayer while lying on your side.” This is related by the group, except for Muslim. An-Nasa’i adds, “And if you cannot offer Prayer while lying on your side, then do it while lying on your back. Allah does not burden a soul, save with what it can bear.”
Jabir reported: The Messenger of Allah visited a sick person and found him praying on a cushion. The Prophet pushed it aside and said, “Pray on the ground if you can, and if you cannot, then pray by making gestures, and make your sajdah (prostration) lower than your ruku` (Al-Bayhaqi).
What is meant by inability is that the person if he prays [in the regular way], will suffer hardship, or his disease will aggravate, or his recovery would be hampered, or he will swoon if he prays in the customary manner. One should sit cross-legged while praying in a sitting position.
`A’ishah narrated that she saw the Prophet (peace and blessings be upon him) sitting cross-legged while praying (An-Nasa’i). It is also permissible to sit in the manner that one sits while performing the Tashahhud.
One who can offer the Prayer neither sitting nor standing is to lie down on his side, and if he cannot do that, he is to lie down on his back with his legs toward the qiblahaccording to his state of health. Ibn Al-Mundhir prefers this opinion. On this point, there is a weak hadith reported by `Ali which states that the Prophet said, “The sick person is to pray standing if he is able. If he cannot do so, he should pray sitting. If he is not able to make the sajdah, he should nod with his head and make the nod of his sujud lower than that of his ruku’. If he cannot pray in a sitting posture, he should pray while lying down on his right side facing the qiblah. If one cannot pray on his right side, he should pray while lying on his back with his legs stretched out toward the qiblah (Ad-Daraqutni).
Some scholars maintain that one can pray in whatever manner is easy for him. It is apparent from the hadith that if one can only nod while lying on his back, then nothing else is obligatory upon him.