«صَلِّ قَائِمًا، فَإِنْ لَمْ تَسْتَطِعْ فَقَاعِدًا، فَإِنْ لَمْ تَسْتَطِعْ فَعَلَى جَنْبٍ».
[صحيح] - [رواه البخاري] - [صحيح البخاري: 1117]
المزيــد ...
‘Imrān ibn Husayn (may Allah be pleased with him) reported: I was suffering from hemorrhoids (piles); so I asked the Prophet (may Allah's peace and blessings be upon him) about the prayer and he said:
"Pray while standing; if you cannot, then while sitting; and if you cannot, then while lying on your side."
The Prophet (may Allah's peace and blessings be upon him) pointed out that the main rule is to pray while standing, except when one is unable to do so, in which case he can pray while sitting, and if he cannot, he can pray while lying on his side.