Allah would awaken the Messenger of Allah ﷺ during the night, and by the time dawn arrived, he would have completed his portion of recitation.
حدثنا حسين بن يزيد الكوفي حدثنا حفص عن هشام بن عروة عن أبيه
إن كان رسول الله ﷺ ليوقظه الله عز وجل بالليل فما يجيء السحر حتى يفرغ من حزبه
[Its chain of transmission is daif] Bayhaqi (3/3) narrated it from the hadith of Abu Dawud through this route. Hafs bin Ghiyath is a mudallis narrator, and he narrated using "an" (an ambiguous form suggesting he heard it directly, without confirming so).