Amir bin Rabia reported that he saw the Messenger of Allah ﷺ performing voluntary prayer while on his mount, nodding his head in whichever direction it faced. The Messenger of Allah ﷺ did not do this during the obligatory prayers.
حدثنا يحيى بن بكير قال حدثنا الليث عن عقيل عن ابن شهاب عن عبد الله بن
أن عامر بن ربيعة أخبره قال رأيت رسول الله ﷺ وهو على الراحلة يسبح يومئ برأسه قبل أي وجه توجه ولم يكن رسول الله ﷺ يصنع ذلك في الصلاة المكتوبة