Sheikh `Atiyya Saqr, former head of Al-Azhar Fatwa Committee stated that: “Muslim scholars found their judgment on the following two hadiths:
1-Both Al-Bukhari and Muslim quoted `Aishah (may Allah be pleased with her) as saying that when the Prophet (peace and blessings be upon him) was once complaining from an injury, and the Companions were with him, paying him a visit, the time for Prayer became due. So, he led them in prayer while sitting but the people praying behind him were standing.
Upon finishing the prayer, the Prophet (peace and blessings be upon him) told them that people praying behind Imam should stick to his posture while praying, if he prays in sitting they should sit, and vice versa. In explaining the reason behind this, the Prophet (peace and blessings be upon him) said that people praying in standing while Imam is sitting resembles the blameworthy practice of Persians towards their kings, who would always sit-down receiving people who’d stand for him in respect. The Prophet (peace and blessings be upon him) in fact forbade standing for one in respect while that person remains sitting.
2-The second hadith is the one narrated also by Bukhari and Muslim in which they quote `A’ishah as stating that when the Prophet (peace and blessings be upon him) was once sick and he went out to pray, people made him sit besides Abu Bakr who performed the prayer standing besides him and being led by the Prophet while people were following him (Abu Bakr).
In the light of these two hadiths, opinions differ, some scholars say that it’s permissible for people to be led by Imam who finds it difficult to perform the prayer in standing. So this means that the people can pray behind such Imam in standing while he sits down. They base this opinion on the second hadith.
However, some other scholars maintain that such thing is not permissible. When an Imam finds it difficult to perform prayer in standing, the people should pray behind him while sitting. They base this opinion on the first hadith.
There is another third opinion saying that this issue depends on what does Imam starts with. If he starts prayer sitting down, the people should sit behind him, if he starts it standing up, they should do the same, no matter any changes that happen to Imam afterwards.
It appears that this issue is really controversial, and Muslim scholars have said a lot on it. For more information, check books of Islamic jurisprudence, (“Nayl Al-Awtar” by Shawkani, Volume 3, Page 180, “Al-Mughni” by Ibn Qudama, Vol 2 Page 47).
As regards the opinions of the four Islamic juristic schools, the Malikis maintain that it’s not permissible for a person to perform prayer behind someone who finds it difficult to pray in standing, even if that prayer happens to be supererogatory.
The Hanafis state that it’s permissible for people to pray behind an Imam who cannot stand for prayer as long as he’s able to bow and prostrate, otherwise, praying behind him is not permissible.
As for Shafi`is, they say that such prayer is permissible even if only what Imam can do is to pray by nodding. The Hanbalis maintain that it’s not permissible for a person to perform prayer behind an Imam who cannot stand up unless he happens to be a regular Imam of the mosque, and his inability is something temporary.
So far this issue is very controversial, one is allowed to follow any opinion without showing bias against others.”