Jabir bin Abdullah reported,

The Messenger of Allah ﷺ said, "Whoever among you fears that he will not wake up in the last part of the night, let him pray the witr at the beginning of the night and then sleep. And whoever among you hopes to wake up in the last part of the night, let him pray the witr in the last part of the night, for recitation in the last part of the night is attended by angels, and that is better."

Ahmad 15179

Sahih

قال وقال رسول الله ﷺ من خاف منكم أن لا يستيقظ من آخر الليل فليوتر من أول الليل ثم ليرقد ومن طمع منكم أن يستيقظ من آخر الليل فليوتر من آخر الليل فإن قراءة آخر الليل محضورة وذلك أفضل

أحمد 15179صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Jabir bin Abdullah
Numbering
Darussalam 15179
Ahmad 15179