In line with the Qur'anQur'an 73:20 ↗۞إِنَّ رَبَّكَ يَعۡلَمُ أَنَّكَ تَقُومُ أَدۡنَىٰ مِن ثُلُثَيِ ٱلَّيۡلِ وَنِصۡفَهُۥ وَثُلُثَهُۥ وَطَآئِفَةٞ مِّنَ ٱلَّذِينَ مَعَكَۚ وَٱللَّهُ يُقَدِّرُ ٱلَّيۡلَ وَٱلنَّهَارَۚ عَلِمَ أَن لَّن تُحۡصُوهُ فَتَابَ عَلَيۡكُمۡۖ فَٱقۡرَءُواْ مَا تَيَسَّرَ مِنَ ٱلۡقُرۡءَانِۚ عَلِمَ أَن سَيَكُونُ مِنكُم مَّرۡضَىٰ وَءَاخَرُونَ يَضۡرِبُونَ فِي ٱلۡأَرۡضِ يَبۡتَغُونَ مِن فَضۡلِ ٱللَّهِ وَءَاخَرُونَ يُقَٰتِلُونَ فِي سَبِيلِ ٱللَّهِۖ فَٱقۡرَءُواْ مَا تَيَسَّرَ مِنۡهُۚ وَأَقِيمُواْ ٱلصَّلَوٰةَ وَءَاتُواْ ٱلزَّكَوٰةَ وَأَقۡرِضُواْ ٱللَّهَ قَرۡضًا حَسَنٗاۚ وَمَا تُقَدِّمُواْ لِأَنفُسِكُم مِّنۡ خَيۡرٖ تَجِدُوهُ عِندَ ٱللَّهِ هُوَ خَيۡرٗا وَأَعۡظَمَ أَجۡرٗاۚ وَٱسۡتَغۡفِرُواْ ٱللَّهَۖ إِنَّ ٱللَّهَ غَفُورٞ رَّحِيمُۢ
Your Lord knows that you stay up nearly two-thirds of the night, or half of it, or one-third of it, along with a group of those with you. God designed the night and the day. He knows that you are unable to sustain it, so He has pardoned you. So read of the Quran what is possible for you. He knows that some of you may be ill; and others travelling through the land, seeking God’s bounty; and others fighting in God’s cause. So read of it what is possible for you, and observe the prayers, and give regular charity, and lend God a generous loan. Whatever good you advance for yourselves, you will find it with God, better and generously rewarded. And seek God’s forgiveness, for God is Forgiving and Merciful.
The verse notes the messenger stood in prayer for differing portions of the night, matching witr prayed at the start, middle and end of night.
In line with the Qur'anQur'an 51:18 ↗وَبِٱلۡأَسۡحَارِ هُمۡ يَسۡتَغۡفِرُونَ
And at dawn, they would pray for pardon.
The verse praises those who seek forgiveness in the hours before dawn, matching the witr finally settled at the pre-dawn time.
In line with the Qur'anQur'an 17:79 ↗وَمِنَ ٱلَّيۡلِ فَتَهَجَّدۡ بِهِۦ نَافِلَةٗ لَّكَ عَسَىٰٓ أَن يَبۡعَثَكَ رَبُّكَ مَقَامٗا مَّحۡمُودٗا
And keep vigil with it during parts of the night, as an extra prayer. Perhaps your Lord will raise you to a laudable position.
The verse commands the messenger to keep night prayer as an extra devotion, matching his regular night witr.