The Prophet ﷺ was thrown from a horse and his right side was grazed. We came to visit him, and when the time for prayer arrived, he led us in prayer while seated, and we prayed behind him seated.When he finished the prayer, he said, "The imam is appointed only to be followed. So when he says the takbir, say the takbir. When he bows, bow. When he says, 'Allah hears the one who praises Him,' say, 'Our Lord, to You belongs all praise.' When he prostrates, prostrate. And when he prays seated, all of you pray seated."
حدثنا هشام بن عمار حدثنا سفيان بن عيينة عن الزهري
أن النبي ﷺ صرع عن فرس فجحش شقه الأيمن فدخلنا نعوده وحضرت الصلاة فصلى بنا قاعدا وصلينا وراءه قعودا فلما قضى الصلاة قال إنما جعل الإمام ليؤتم به فإذا كبر فكبروا وإذا ركع فاركعوا وإذا قال سمع الله لمن حمده فقولوا ربنا ولك الحمد وإذا سجد فاسجدوا وإذا صلى قاعدا فصلوا قعودا أجمعين
Bukhari related it, in the Book of Adhan, chapter "He goes down saying the takbir when he prostrates," hadith no. 805, and Muslim, in the Book of Prayer, the preceding chapter, hadith no. 411, both from the hadith of Sufyan, and it is found in his Juz.