وَيُسْتَحَبُّ فِي الْوِتْرِ لِمَنْ يَأْلَفُ صَلَاةَ اللَّيْلِ أَنْ يُؤَخِّرَ الْوِتْرَ إِلَى آخِرِ اللَّيْلِ، وَإِنْ لَمْ يَثِقْ بِالِانْتِبَاهِ: أَوْتَرَ قَبْلَ النَّوْمِ
Translation: For someone accustomed to night prayer it is recommended to delay Witr to the end of the night; if unsure of waking, one should perform Witr before sleeping.
In both cases Witr remains within its valid time from after Isha until dawn. The preference depends on the person’s established habit and likelihood of waking.