The Prophet ﷺ told Imran ibn Husayn, who had piles: pray standing; if you cannot, sitting; and if you cannot, on your side. Allah has not placed any hardship on you in the religion (22:78) and does not burden a soul beyond its capacity (2:286).
1The steps of ease
Pray standing if able, even by leaning on a wall or a stick.
If standing is not possible or harms him, pray sitting, and bow and prostrate as he can.
If sitting is not possible, pray on the side, facing the Qibla. If that is not possible, on the back with the feet toward the Qibla.
If bowing and prostrating are not possible, nod with the head, with the prostration lower than the bowing.
If even a nod is not possible, make the movements in the mind. The prayer is not dropped as long as the person is conscious.
2Combining and purification
A sick person who finds that wudu is hard on him may use tayammum.
A sick person who finds it hard to pray each prayer on time may combine Dhuhr with Asr and Maghrib with Isha, according to the Hanbali and Maliki schools.
Where the schools differ
The four Sunni schools agree on the main ruling above and differ in these points. No school is preferred here.
Standing is dropped when it causes real harm or severe pain, or would delay recovery. The schools agree on this. Praying sitting out of laziness, when able to stand, is not valid.
Аллоҳ ҳеч бир жонни тоқатидан ташқари нарсага таклиф қилмас. Фойдаси ҳам касбидан, зарари ҳам касбидан. Эй Роббимиз, агар унутсак ёки хато қилсак, (иқобга) тутмагин. Эй Роббимиз, биздан олдингиларга юклаганга ўхшаш оғирликни бизга юкламагин. Эй Роббимиз, бизга тоқатимз етмайдиган нарсани юкламагин. Бизни афв эт, мағфират қил ва раҳм эт. Сен ҳожамизсан. Бас, кофир қавмларга бизни ғолиб қил. (Ҳамма нарсани дақиқ-дақиқларигача билувчи Аллоҳ ҳар бир жонни ҳам нимага ярайдию нимага ярамайди–яхши билади. Бандаларига меҳрибонлигидан имкони ва ҳаққи бўлса ҳам, ҳеч бир жонни тоқатидан ташқари нарсага таклиф қилмайди. Аллоҳнинг буйруқлари ва қайтариқлари банданинг имкони даражаси доирасида бўлади. Ана ўша таклифга амал қилишига қараб, бошқа ҳеч бир нарсага қарамасдан, банданинг жазоси ёки мукофоти белгиланади. Имом Аҳмад ривоят қилган ҳадисда Пайғамбар алайҳиссалом: «Сураи Бақаранинг икки оятини ўқи, улар менга аршнинг остидаги хазинадан берилган», деганлар. Бошқа бир ҳадисда: «Ким Бақара сураси охиридаги икки оятни бир кечада ўқиса, кифоя қилади», деганлар...)
Ва Аллоҳ (йўлида) ҳақ жиҳод қилингиз. У сизларни танлаб олди. Ва сизга бу динда ҳеч танглик қилмади. Бу отангиз Иброҳимнинг миллати. У сизларни бундан олдин ва бу(Қуръон)да Пайғамбар сизларга гувоҳ бўлиши учун, сизлар эса, одамларга гувоҳлар бўлишингиз учун мусулмонлар деб номлади. Бас, намозни тўкис адо этинглар, закот беринглар ва Аллоҳга боғланинглар. У сизнинг хожангиздир. Бас, У зот қандай ҳам яхши хожа ва қандай ҳам яхши нусрат бергувчи. (Суранинг охиридаги ушбу икки оятда Аллоҳ таоло Ислом умматига нидо қилмоқда. Бу нидо мусулмонларга энг маҳбуб мурожаат билан «Эй иймон келтирганлар», деб бошламоқда. Бу нидо ўзидан кейин келадиган амрларни алоҳида кўтаринки руҳда адо этишга ундайди. Ундан кейин келаётган амрлар эса, рукуъ, сажда қилмоқликдир.)
From the Sunnah
Sahih al-Bukhari 1117Authentic collection
The point of the hadith: Pray standing, and if you cannot, sitting, and if you cannot, on your side.
Read the Arabic text
حَدَّثَنَا عَبْدَانُ، عَنْ عَبْدِ اللَّهِ، عَنْ إِبْرَاهِيمَ بْنِ طَهْمَانَ، قَالَ حَدَّثَنِي الْحُسَيْنُ الْمُكْتِبُ، عَنِ ابْنِ بُرَيْدَةَ، عَنْ عِمْرَانَ بْنِ حُصَيْنٍ ـ رضى الله عنه ـ قَالَ كَانَتْ بِي بَوَاسِيرُ فَسَأَلْتُ النَّبِيَّ صلى الله عليه وسلم عَنِ الصَّلاَةِ فَقَالَ " صَلِّ قَائِمًا، فَإِنْ لَمْ تَسْتَطِعْ فَقَاعِدًا، فَإِنْ لَمْ تَسْتَطِعْ فَعَلَى جَنْبٍ ".
This is general information, not a fatwa. For your own situation, ask a qualified scholar.
Fiqh questions
Prayer in illness
The Prophet ﷺ told Imran ibn Husayn, who had piles: pray standing; if you cannot, sitting; and if you cannot, on your side. Allah has not placed any hardship on you in the religion (22:78) and does not burden a soul beyond its capacity (2:286).
Is this a fatwa?
No. It is a summary of well-known rulings with their evidence. For your own case, ask a qualified scholar.
What if my school differs from this answer?
Follow the view of the school you follow and the scholar who teaches you. The page lists the differences of the four schools.