Mishkat al-Masabih 1260
وَعَنْ جَابِرٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ خَافَ أَنْ لَا يَقُومَ مِنْ آخِرِ اللَّيْلِ فَلْيُوتِرْ أَوَّلَهُ وَمَنْ طَمِعَ أَنْ يَقُومَ آخِرَهُ فَلْيُوتِرْ آخِرَ اللَّيْلِ فَإِنَّ صَلَاةَ آخِرِ اللَّيْلِ مَشْهُودَةٌ وَذَلِكَ أَفْضَلُ» . رَوَاهُ مُسلم
From Jabir, who said: The Messenger of Allah ﷺ said: "Whoever fears that he will not get up at the end of the night, let him pray witr at the beginning of it; and whoever hopes to get up at the end of it, let him pray witr at the end of the night, for the prayer at the end of the night is witnessed, and that is better." Reported by Muslim.