Sahih Muslim 420
The Book of Prayers
If The Imam Experiences An Excuse, From Illness, Or Travelling, Etc. He May Appoint Someone Else To Lead The People In Prayer; The One Who Offers Prayer Behind The Imam Sitting Because He Is Unable To Stand Must Stand If He Is Able To Do So; And The Abrogation Of Sitting Behind A Sitting Imam For Those Who Are Able To Stand
Abu Musa reported: When the Messenger of Allah (ﷺ) became ill and illness became serious he ordered Abu Bakr to lead the people in prayer. Upon this 'A'isha said: Messenger of Allah, Abd Bakr is a man of tenderly feelings: when he would stand in your place (he would be so much overwhelmed -by grief that) he would not be able to lead the people in prayer. He (the Prophet) said: You order Abu Bakr to lead the people in prayer, and added: You are like the female companions of Yusuf. So Abu Bakr led the prayer (during this period of illness) in the life of the Messenger of Allah (ﷺ).