عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: ((مَنْ نَامَ عَنِ الْوِتْرِ أَوْ نَسِيَهُ فَلْيُوْتِرْ إِذَا ذَكَرَهُ أَوِ اسْتَيْقَظَ))
Sayyiduna Abu Sa'id Khudri (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) said: Whoever misses the Witr prayer due to sleep or forgetfulness, then whenever he remembers or wakes up, he should perform the Witr.