Abdullah bin Abbas reported that he spent the night at the home of Maymunah, the Mother of the Believers, who was his maternal aunt. He lay down across the width of the pillow, while the Messenger of Allah ﷺ and his wife lay along its length. The Messenger of Allah ﷺ slept until about midnight, or a little before, or a little after. He woke up and sat rubbing the sleep from his face with his hand, then he recited the last ten verses of Surah Al Imran. He then went to a water-skin that was hanging up, performed ablution from it, doing so thoroughly, and stood to pray.Abdullah bin Abbas said, "I got up and did just as he had done, then I went and stood beside him. The Messenger of Allah ﷺ placed his right hand on my head and took hold of my right ear, twisting it gently. He prayed two rakahs, then two more, then two more, then two more, then two more, then two more, then performed the witr prayer. Then he lay down until the muezzin came to him, after which he prayed two short rakahs."
أخبرنا محمد بن سلمة قال أنبأنا ابن القاسم عن مالك قال حدثني مخرمة بن سليمان
أن عبد الله بن عباس أخبره أنه بات عند ميمونة أم المؤمنين وهي خالته فاضطجع في عرض الوسادة واضطجع رسول الله ﷺ وأهله في طولها فنام رسول الله ﷺ حتى إذا انتصف الليل أو قبله قليلا أو بعده قليلا استيقظ رسول الله ﷺ فجلس يمسح النوم عن وجهه بيده ثم قرأ العشر الآيات الخواتيم من سورة آل عمران ثم قام إلى شن معلقة فتوضأ منها فأحسن وضوءه ثم قام يصلي قال عبد الله بن عباس فقمت فصنعت مثل ما صنع ثم ذهبت فقمت إلى جنبه فوضع رسول الله ﷺ يده اليمنى على رأسي وأخذ بأذني اليمنى يفتلها فصلى ركعتين ثم ركعتين ثم ركعتين ثم ركعتين ثم ركعتين ثم ركعتين ثم أوتر ثم اضطجع حتى جاءه المؤذن فصلى ركعتين خفيفتين
Bukhari transmitted it, wudu, chapter on reciting the Quran after answering the call of nature or the like, hadith no. 183 and elsewhere, and Muslim, prayer of the traveler, chapter on the prayer and supplication of the Prophet ﷺ at night, hadith no. 763/182, from the hadith of Malik through this same chain, and it is found in Muwatta (Yahya), 1/121-122.