Sayyiduna Abu Mas'ud Uqbah bin Amr (may Allah be pleased with him) narrates about the Prophet (peace and blessings be upon him): He (peace and blessings be upon him) would perform the witr in the early part of the night, or in the middle part, or in the last part (that is, at any time).
Imam Ahmad and Imam al-Tabarani in al-Mu'jam al-Kabir and al-Mu'jam al-Awsat recorded this narration, and its narrators are thiqat (trustworthy). Imam al-Tabarani added these words: "Whichever of these a person does, it will be correct."