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
باب مَنْ خَافَ أَنْ لاَ يَقُومَ مِنْ آخِرِ اللَّيْلِ فَلْيُوتِرْ أَوَّلَهُ
Sahih Muslim, Book of The Book of Prayer - Travellers(view book)
Jabir reported Messenger of Allah ﷺ as saying: If anyone is afraid that he may not get up in the latter part of the night, he should observe Witr in the first part of it;
and if anyone is eager to get up in the last part of it, he should observe Witr at the end of the night, for prayer at the end of the night is witnessed (by the angels) and that is preferable.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا حَفْصٌ، وَأَبُو مُعَاوِيَةَ عَنِ الأَعْمَشِ، عَنْ أَبِي سُفْيَانَ، عَنْ جَابِرٍ، قَالَ قَالَ رَسُولُ اللَّهِ ﷺ " مَنْ خَافَ أَنْ لاَ يَقُومَ مِنْ آخِرِ اللَّيْلِ فَلْيُوتِرْ أَوَّلَهُ وَمَنْ طَمِعَ أَنْ يَقُومَ آخِرَهُ فَلْيُوتِرْ آخِرَ اللَّيْلِ فَإِنَّ صَلاَةَ آخِرِ اللَّيْلِ مَشْهُودَةٌ وَذَلِكَ أَفْضَلُ " . وَقَالَ أَبُو مُعَاوِيَةَ مَحْضُورَةٌ .
Classification
Jabir reported Messenger of Allah ﷺ 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 to visited (by angels), and that is excellent.
وَحَدَّثَنِي سَلَمَةُ بْنُ شَبِيبٍ، حَدَّثَنَا الْحَسَنُ بْنُ أَعْيَنَ، حَدَّثَنَا مَعْقِلٌ، - وَهُوَ ابْنُ عُبَيْدِ اللَّهِ - عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، قَالَ سَمِعْتُ النَّبِيَّ ﷺ يَقُولُ " أَيُّكُمْ خَافَ أَنْ لاَ يَقُومَ مِنْ آخِرِ اللَّيْلِ فَلْيُوتِرْ ثُمَّ لْيَرْقُدْ وَمَنْ وَثِقَ بِقِيَامٍ مِنَ اللَّيْلِ فَلْيُوتِرْ مِنْ آخِرِهِ فَإِنَّ قِرَاءَةَ آخِرِ اللَّيْلِ مَحْضُورَةٌ وَذَلِكَ أَفْضَلُ " .