(12) باب إِذَا عَادَ مَرِيضًا فَحَضَرَتِ الصَّلاَةُ فَصَلَّى بِهِمْ جَمَاعَةً
Narrated `Aisha:
During the ailment of the Prophet (ﷺ) some people came to visits him. He led them in prayer while sitting. but they prayed standing, so he waved to them to sit down. When he had finished the prayer, he said, "An Imam is to be followed, so when he bows, you should bow. and when he raises his head, you should raise yours, and if he prays sitting. you should pray sitting." Abu `Abdullah said Al-Humaidi said, (The order of ) "This narration has been abrogated by the last action of the Prophet (ﷺ) as he led the prayer sitting, while the people prayed standing behind him.'
Reference: Sahih al-Bukhari 5658
In-book reference: Book 75, Hadith 19
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 7, Book 70, Hadith 562