Abu Mijlaz (may Allah have mercy on him) said: Sayyiduna Ibn Umar (may Allah be pleased with them both) reached the morning and had not prayed witr, or the morning was near, or he reached the morning, and then he prayed witr.
This (version) is more likely to be correct.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4521