Jabir bin Abdullah reported,

The Messenger of Allah ﷺ said, "Whoever fears he will not rise at the end of the night should perform the witr prayer at its beginning, and whoever hopes to rise at its end should perform the witr at the end of the night, for the prayer at the end of the night is witnessed, and that is better."Abu Muawiya said, "attended."

Muslim 1766

Sahih

حدثنا أبو بكر بن أبي شيبة حدثنا حفص وأبو معاوية عن الأعمش عن أبي سفيان

عن جابر قال

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

مسلم 1766صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Travelers' prayer and its shortening
Chapter
Whoever fears he will not wake at the end of the night should pray witr at its beginning
Numbering
Darussalam 1766
Muslim 1766