When one of you leads the people in prayer, he should be brief, for among them are the weak, the sick, and the aged. But when one of you prays by himself, he may pray as long as he likes. (Using translation from Abū Dāʾūd 794)
"إذا صلَّى أحدُكُم للنّاسِ فَليُخَفِّفَ، فإِنَّ فيهم الضَّعِيفَ والسقيمَ والكبيرَ، وإذَا صلَّى أحدُكُمْ لنفسِه فَليُطَوِّلْ ما شَاءَ".