The Messenger of Allah ﷺ used to pray Witr at the beginning of the night and in the middle and at the end, then he persisted in praying it at the end of the night.
كَانَ رَسُولُ اللهِ ﷺ يُوتِرُ فِي أَوَّلِ اللَّيْلِ وَفِي وَسَطِهِ وَفِي آخِرِهِ ثُمَّ ثَبَتَ لَهُ الْوَتْرُ فِي آخِرِهِ