Sayyiduna Anas (may Allah be pleased with him) narrates: Some people came to the service of the Noble Prophet (peace and blessings of Allah be upon him). The time for prayer had arrived. The Noble Prophet (peace and blessings of Allah be upon him) began to lead them in prayer while sitting. Those people remained standing. When the time for the next prayer came, those people began to stand, so the Noble Prophet (peace and blessings of Allah be upon him) said: "You should follow your Imam. If he performs the prayer sitting, then you should also perform the prayer sitting. If he performs the prayer standing, then you should also perform the prayer standing."
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 2111
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «الإرواء» (2/ 119).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط مسلم، رجاله ثقات رجال الشيخين غير محمد بن عبد الأعلى، فإنه من رجال مسلم وحده.