كتاب صلاة المسافرين وقصرها
6  
The Book of Prayer - Travellers
(21)
Chapter: One who fears that he will not get up at the end of the night, then he should pray Witr at the beginning of the night
(21)
باب مَنْ خَافَ أَنْ لاَ يَقُومَ مِنْ آخِرِ اللَّيْلِ فَلْيُوتِرْ أَوَّلَهُ ‏
Sahih Muslim 755 b

Jabir reported Allah's Messenger (ﷺ) as saying:

He who amongst you is afraid that he may not be able to get up at the end of the night should observe Witr (in the first part) and then sleep, and he who is confident of getting up and praying at night (i. e. Tahajjud prayer) should observe it at the end of it, for the recitation at the end of the night is witnessed*, and that is better.

*: meaning, "by angels" (Sharh an-Nawawi)
وَحَدَّثَنِي سَلَمَةُ بْنُ شَبِيبٍ، حَدَّثَنَا الْحَسَنُ بْنُ أَعْيَنَ، حَدَّثَنَا مَعْقِلٌ، - وَهُوَ ابْنُ عُبَيْدِ اللَّهِ - عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، قَالَ سَمِعْتُ النَّبِيَّ صلى الله عليه وسلم يَقُولُ ‏ "‏ أَيُّكُمْ خَافَ أَنْ لاَ يَقُومَ مِنْ آخِرِ اللَّيْلِ فَلْيُوتِرْ ثُمَّ لْيَرْقُدْ وَمَنْ وَثِقَ بِقِيَامٍ مِنَ اللَّيْلِ فَلْيُوتِرْ مِنْ آخِرِهِ فَإِنَّ قِرَاءَةَ آخِرِ اللَّيْلِ مَحْضُورَةٌ وَذَلِكَ أَفْضَلُ ‏"‏ ‏.‏
Reference : Sahih Muslim 755b
In-book reference : Book 6, Hadith 196
USC-MSA web (English) reference : Book 4, Hadith 1651
  (deprecated numbering scheme)