Jabir bin Abdullah reported,

The Messenger of Allah ﷺ fell ill, so we prayed behind him while he was seated, and Abu Bakr was calling out the takbir to make the people hear it. The Prophet ﷺ turned toward us and saw us standing, so he gestured to us, and we sat down and prayed seated, following his prayer.When he had finished with the salam, he said, "You were about to do as the Persians and Romans do, standing over their kings while they remain seated. Do not do that. Follow your imams. If he prays standing, then pray standing, and if he prays seated, then pray seated."

Ibn Majah 1240

Sahih

حدثنا محمد بن رمح المصري أنبأنا الليث بن سعد عن أبي الزبير

عن جابر قال

اشتكى رسول الله ﷺ فصلينا وراءه وهو قاعد وأبو بكر يكبر يسمع الناس تكبيره فالتفت إلينا فرآنا قياما فأشار إلينا فقعدنا فصلينا بصلاته قعودا فلما سلم قال إن كدتم أن تفعلوا فعل فارس والروم يقومون على ملوكهم وهم قعود فلا تفعلوا ائتموا بأئمتكم إن صلى قائما فصلوا قياما وإن صلى قاعدا فصلوا قعودا

ابن ماجه 1240صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
Imam is appointed to be followed
Numbering
Darussalam 1240
Ibn Majah 1240