the ḥadīth of ʿĀʾishah (may Allah be pleased with her), which states that if the Prophet—peace and blessings be upon him—was prevented by illness or anything else, such as sleep, from praying at night, he would pray twelve rakʿahs during the day. This is because he usually maintained eleven rakʿahs on most nights, so when he made them up he chose the more complete and larger number—namely, twelve. Accordingly, if someone customarily ends the night with three rakʿahs of witr but fails to rise, he should make up four rakʿahs during the day, not three. If his habit is five, he makes up six, and so on.
As for the time of making them up, it is between sunrise and the sun’s zenith, as indicated by the ḥadīth of ʿUmar (may Allah be pleased with him) concerning a person who misses his nightly portion of worship or part of it: he should make it up during the forenoon (duḥā). Thus he performs it then; but if he forgets and only remembers after ẓuhr, he may perform it after ẓuhr, in light of the general statement of the Prophet—peace and blessings be upon him: “Whoever sleeps through a prayer or forgets it must pray it when he remembers it.”
These ḥadīths also show that if drowsiness overtakes a person while he is praying, he should stop, for he might seek forgiveness yet end up insulting himself because he is nodding off, or the Qur’an may become tangled on his tongue so that he recites a word incorrectly and thereby alters the Qur’an. Therefore, if it is your habit to pray at night and sleep overcomes you, do not force yourself; sleep until the drowsiness has passed.