Jabir bin Abdullah reported,

The Messenger of Allah ﷺ said, "Whoever fears he will not be able to rise in the last part of the night should perform the witr prayer at the beginning of the night, and whoever expects to rise at its end should perform witr at the end of the night, for the prayer at the end of the night is witnessed, and that is more excellent."In another narration, "Whichever of you fears he will not rise at the end of the night should perform witr and then sleep, and whoever is confident that he will rise at the end of the night should perform witr at its end, for the recitation at the end of the night is witnessed, and that is more excellent."

Azami 2795

Sahih

عن جابر قال

قال رسول الله ﷺ: من خاف أن لا يقوم من آخر الليل فليوتر أوله، ومن طمع أن يقوم آخره فليوتر آخر الليل، فإن صلاة آخر الليل مشهودة، وذلك أفضل. وفي رواية: أيكم خاف أن لا يقوم من آخر الليل فليوتر، ثم ليرقد، ومن وثق بقيام من الليل فليوتر من آخره. فإن قراءة آخر الليل محضورة، وذلك أفضل.

الأعظمي 2795صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Witr prayer
Section
Preferred time for witr is the end of the night for one who is able, and performing it earlier for others
Numbering
Jami al-Kamil 2795 (2nd edition)
Azami 2795