It is narrated from Sayyiduna Jabir (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Whoever among you thinks that he may not be able to wake up in the last part of the night, he should offer Witr in the first part of the night. And whoever thinks that he will be able to wake up in the last part of the night, he should offer Witr in the last part, for at that time the angels are present during the prayer, and this is the best way."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 14381
Hadith Gradingحکم دارالسلام:حديث صحيح، م: 755، وهذا إسناد قوي