The Prophet ﷺ said: If anyone oversleeps and misses the witr, or forgets it, he should pray when he remembers. (Using translation from Abū Dāʾūd 1431)
قَالَ رَسُولُ اللهِ ﷺ مَنْ نَسِيَ الْوَتْرَ أَوْ نَامَ عَنْهَا فَلْيُصَلِّهَا إِذَا ذَكَرَهَا أَوْ إِذَا أَصْبَحَ