Al-Adab Al-Mufrad, Book 41, Hadith 9 (In-Book)

Jabir said, "In Madina, the Messenger of Allah, may Allah bless him and grant him peace, was thrown from a horse onto a palm trunk and dislocated his foot. We used to visit him in the room of 'A'isha. We came upon him while he was praying sitting down and we prayed standing behind him. He indicates to us that we should sit down. When he finished the prayer, he said, 'When the Imam prays sitting, then pray sitting. When he prays standing, then pray standing. Do not stand while the imam is sitting as the Persians do with their great men.'"

حَدَّثَنَا مُوسَى، قَالَ‏:‏ حَدَّثَنَا أَبُو عَوَانَةَ، عَنِ الأَعْمَشِ، عَنْ أَبِي سُفْيَانَ، عَنْ جَابِرٍ قَالَ‏:‏ صُرِعَ رَسُولُ اللهِ صلى الله عليه وسلم مِنْ فَرَسٍ بِالْمَدِينَةِ عَلَى جِذْعِ نَخْلَةٍ، فَانْفَكَّتْ قَدَمُهُ، فَكُنَّا نَعُودُهُ فِي مَشْرُبَةٍ لِعَائِشَةَ رَضِيَ اللَّهُ عَنْهَا، فَأَتَيْنَاهُ وَهُوَ يُصَلِّي قَاعِدًا، فَصَلَّيْنَا قِيَامًا، ثُمَّ أَتَيْنَاهُ مَرَّةً أُخْرَى وَهُوَ يُصَلِّي الْمَكْتُوبَةَ قَاعِدًا، فَصَلَّيْنَا خَلْفَهُ قِيَامًا، فَأَوْمَأَ إِلَيْنَا أَنِ اقْعُدُوا، فَلَمَّا قَضَى الصَّلاَةَ قَالَ‏:‏ إِذَا صَلَّى الإِمَامُ قَاعِدًا فَصَلُّوا قُعُودًا، وَإِذَا صَلَّى قَائِمًا فَصَلُّوا قِيَامًا، وَلاَ تَقُومُوا وَالإِمَامُ قَاعِدٌ كَمَا تَفْعَلُ فَارِسُ بِعُظَمَائِهِمْ‏.‏

sunnah.com