When the Messenger of Allah ﷺ finished his prayer in the latter part of the night, he would look over at me. If I was awake, he would speak with me, and if I was asleep, he would wake me. Then he would pray two units of prayer and lie down until the muezzin came to call him for the dawn prayer. He would then pray two brief units before going out to the prayer.
حدثنا يحيى بن حكيم حدثنا بشر بن عمر حدثنا مالك بن أنس عن سالم أبي النضر عن أبي سلمة بن عبد الرحمن
كان رسول الله ﷺ إذا قضى صلاته من آخر الليل نظر فإن كنت مستيقظة حدثني وإن كنت نائمة أيقظني وصلى الركعتين ثم اضطجع حتى يأتيه المؤذن فيؤذنه بصلاة الصبح فيصلي ركعتين خفيفتين ثم يخرج إلى الصلاة
Bukhari narrated it in the chapter on shortening the prayer, section "If he prays sitting and then recovers," etc., hadith no. 1119, from the hadith of Malik. Muslim narrated it in the chapter on the prayer of travelers, section on the night prayer and the number of units of prayer the Prophet ﷺ performed at night, etc., hadith no. 743, from the hadith of Salim Abu Nadr, through the same chain.