It is narrated from Sayyiduna Sa'id bin al-Musayyib, may Allah have mercy on him, that the Messenger of Allah ﷺ asked Sayyiduna Abu Bakr, may Allah be pleased with him: "When do you perform Witr?" Sayyiduna Abu Bakr, may Allah be pleased with him, replied: "I perform it before sleeping," or he said, "I perform it in the first part of the night." And the Prophet ﷺ asked Sayyiduna 'Umar, may Allah be pleased with him: "'Umar, when do you perform it?" Sayyiduna 'Umar, may Allah be pleased with him, said: "In the last part of the night." The Prophet ﷺ said: "Shall I not give you an example? Abu Bakr, your example is like that of a person who said, 'I have secured my share,' meaning I have performed the obligatory act before sleeping, and if I wake up, I will also perform the voluntary prayers. And O 'Umar, this is the action of strong people that you have done."
Hadith Referenceالسنن المأثورة / باب من أوتر من أول الليل وآخره / 173