Messenger of Allah ﷺ prayed in his house while sitting during his illness and the people prayed behind him standing and he pointed to them to sit down. When he had finished the prayer, he said, "The Imam is to be followed and so when he bows you should bow; and when he lifts his head you should also do the same."
أَنَّهَا قَالَتْ صَلَّى رَسُولُ اللَّهِ ﷺ فِي بَيْتِهِ وَهْوَ شَاكٍ فَصَلَّى جَالِسًا وَصَلَّى وَرَاءَهُ قَوْمٌ قِيَامًا فَأَشَارَ إِلَيْهِمْ أَنِ اجْلِسُوا فَلَمَّا انْصَرَفَ قَالَ إِنَّمَا جُعِلَ الإِمَامُ لِيُؤْتَمَّ بِهِ فَإِذَا رَكَعَ فَارْكَعُوا وَإِذَا رَفَعَ فَارْفَعُوا