Salah remains obligatory regardless of illness, but Islam allows real flexibility in how it is performed. When 'Imran ibn Husain, who suffered from hemorrhoids, asked the Prophet how to pray, he was told: 'Pray while standing; if you cannot, then sitting; and if you cannot, then lying on your side' (Sahih al-Bukhari 1117). Later jurists extended this progression based on the same spirit of removing hardship: if lying on the side facing the qiblah is not possible, one may pray lying on the back with the feet toward the qiblah if feasible, and if physical movement is impossible altogether, one may perform the bowing and prostration by inclining the head, prostration lower than bowing, or ultimately pray with the eyes or simply the heart's intention if no movement at all is possible, according to the majority of scholars. Ablution can similarly be adapted through tayammum if using water is harmful. The underlying principle, drawn from the Quran's statement that Allah does not burden a soul beyond its capacity, is that prayer is never simply dropped due to sickness — only its form is adjusted.
Q&A · Prayer
How should a sick person perform salah if they cannot stand or sit normally?
References
Sahih al-Bukhari 1117
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.