Chapter: The Prayer of Those with Excuses
A sick person must perform the prayer standing; if he cannot, then seated; if he is still unable, then on his side. Should he pray lying flat on his back with his feet toward the qiblah, the prayer is valid, and he gestures for bowing and prostration, lowering the prostration more than the bowing.1 If even that is impossible, he signals with his eyes. If, during the prayer, he regains—or loses—the ability to adopt a different posture, he shifts to whichever form his condition permits.2
If he can stand and sit yet is unable to bow and prostrate, he gestures for bowing while standing and for prostration while sitting.3
It is also permissible for a sick person to pray lying on his back, even though he could stand, when required for treatment on the advice of a physician.