It is narrated from Aisha (may Allah be pleased with her) that when the Messenger of Allah (peace and blessings be upon him) was ill, he ordered Abu Bakr (may Allah be pleased with him) to lead the people in prayer. When the Prophet (peace and blessings be upon him) felt some relief, he came (to the mosque) and sat beside Abu Bakr (may Allah be pleased with him). The Messenger of Allah (peace and blessings be upon him) led Abu Bakr (may Allah be pleased with him) in prayer while sitting, and Abu Bakr (may Allah be pleased with him) led the people in prayer while standing.
Hadith Referenceمسند الإمام الشافعي / كتاب الصلاة / 312
Hadith Takhrijاخرجہ البخاری، الاذان، باب من قام الی جنب الامام لعلة: 683، ومسلم، الصلاة، باب استخلاف الامام اذا عرض لہ عذر من مرض وسفر وغيرهما .... الخ 418۔