Praise be to Allah.
The basic principle with regard to the obligatory and essential parts of the prayer is that the worshipper must do whatever he can, and whatever he is not able to do is waived in his case.
Based on that, if the worshipper is able to start the prayer standing, then this is what he must do, then bow properly if he is able to. If he is not able to do that, then he may lean forward as much as he is able.
If he is able to prostrate on the ground, then this is what he must do.
If he is not able to prostrate on the ground, then he may sit (on the floor or on a chair), then he may lean forward for prostration (sujood).
If he is not able to stand up again, then he may complete his prayer sitting, leaning forward for bowing (rukoo‘), and prostrating on the ground if he is able to.
If he is not able to do that, then he may lean forward for prostration, and make the leaning for prostration lower than the leaning for bowing.
In this way, the worshipper will have complied with the words of Allah, may He be exalted (interpretation of the meaning): “So fear Allah as much as you are able” [at-Taghaabun 64:16],
and with the words of the Messenger (blessings and peace of Allah be upon him): “If I command you to do anything, do as much of it as you can.” Narrated by al-Bukhaari (7288) and Muslim (1337).
In Mukhtasar Khaleel, which is a Maaliki book, it says: If he is able to do everything, but if he prostrates he cannot get up again, then he should complete a rak‘ah, then remain seated.
Al-Khurashi said in his Sharh (1/298): That is, if the worshipper is able to do all the essential parts of the prayer, namely standing, reciting Qur’an, bowing, prostrating, rising from the two prostrations and sitting, but if he sits he will not be able to get up and stand, then he should do the first rak‘ah standing, and complete the rest of his prayer sitting. This is the view favoured by al-Lakhmi, at-Tunisi and Ibn Yoonus. And it was said that he should offer all of his prayer standing and leaning forward (for bowing and prostration), except the last rak‘ah, in which he should bow and prostrate normally. End quote.
If the worshipper is able to stand and lie down, but he is not able to sit, then he may pray standing, leaning forward for bowing and prostrating, and reciting the tashahhud whilst standing, then saying the tasleem.
Zakariyya al-Ansaari ash-Shaafa‘i said in Asna’l-Mataalib (1/146):
Whoever is able to stand and lie down only, may stand instead of sitting, because standing is like sitting and then some, and he should lean forward instead of bowing and prostrating, and recite the tashahhud whilst standing. He should not lie down. End quote.
In Haashiyat al-‘Ibaadi ‘ala Tuhfat al-Muhtaaj (2/23) it says:
If he is able to stand or to lie down only, i.e., he is not able to sit, then he should stand and that is obligatory, because standing is like sitting and then some, and he should lean forward as much as he can whilst standing up for bowing and prostration … and he should recite the tashahhud and tasleem whilst standing; he should not lie down. End quote.
Al-Khurashi al-Maaliki said (1/297):
The one who is unable to do all the essential parts of the prayer, except standing, which he is able to do, should do all of his prayer standing, and lean forward more for his prostration than for his bowing. End quote.
If he is not able to stand, then he may pray sitting, and lean forward instead of bowing and prostrating. If he is able to prostrate on the ground, then he must do that.
Ibn Qudaamah said in al-Mughni (2/570):
The scholars are unanimously agreed that the one who is not able to stand may pray sitting. End quote.
In Haashiyat ad-Dasooqi (2/475), it says that the one who is unable to stand may offer the prayer sitting, doing the bowing and prostration from that position. End quote.
If there is a sick person who can either stand for the entire prayer or sit for the entire prayer, then he should pray sitting.
This is indicated by the fact that Islamic teaching waives the obligation of standing in some cases, such as naafil prayers, or when a man who is able to stand prays behind an imam who is sick and prays sitting; in that case, he should refrain from standing and pray sitting like his imam.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: Standing is an essential part of the prayer, but it may be waived in any naafil prayer, and may be waived in obligatory prayers in some circumstances.
End quote from Sharh al-‘Umdah (4/515).
If there is a conflict between standing and sitting, then doing the prayer sitting is what takes precedence, especially when it is possible, when sitting, to do other essential parts of the prayer, such as prostrating, sitting between the two prostrations, and sitting to recite the tashahhud. Therefore it is more appropriate that doing the entire prayer whilst standing.
And Allah knows best.