(18) باب الصَّلاَةِ فِي السُّطُوحِ وَالْمِنْبَرِ وَالْخَشَبِ
Narrated Anas bin Malik:
Once Allah's Messenger (ﷺ) fell off a horse and his leg or shoulder got injured. He swore that he would not go to his wives for one month and he stayed in a Mashruba [??] (attic room) having stairs made of date palm trunks. So his companions came to visit him, and he led them in prayer sitting, whereas his companions were standing. When he finished the prayer, he said, "Imam is meant to be followed, so when he says 'Allahu Akbar,' say 'Allahu Akbar' and when he bows, bow and when he prostrates, prostrate and if he prays standing pray, standing. After the 29th day the Prophet (ﷺ) came down (from the attic room) and the people asked him, "O Allah's Messenger (ﷺ)! You swore that you will not go to your wives for one month." He said, "The month is 29 days."
Reference: Sahih al-Bukhari 378
In-book reference: Book 8, Hadith 30
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 1, Book 8, Hadith 375