and if it is of the sort that cannot be made up, then Allah—exalted is He—pardons the person. It is firmly established from the Prophet ﷺ that when someone falls ill or travels, the reward of whatever good deeds he used to perform while healthy and resident is still written for him. Likewise, if he leaves an act of worship for a legitimate excuse, he should make it up.
In the ḥadith of ʿĀʾishah cited by the author, the Prophet ﷺ, whenever he missed the night vigil because of pain or some other reason, would pray twelve rakʿahs during the day. The reason is that he normally performed an eleven-rakʿah witr. If the night passed and he had not prayed witr because of sleep or the like, he would make up that prayer; but since the time for witr had ended, the prescribed manner was to pray it as an even number. Accordingly: whoever habitually offers three for witr and then sleeps through it should pray four in the daytime; if he habitually offers five, he should pray six; if seven, he should pray eight; if nine, he should pray ten; and if he normally offers eleven rakʿahs, he should pray twelve—just as the Prophet ﷺ did.
This ḥadith points to an important principle: a timed act of worship that is missed for a valid excuse is to be made up, whereas an act that is tied to a specific cause is not made up once that cause is gone. Take, for example, the sunnah associated with wuḍūʾ: after performing ablution it is sunnah to pray two rakʿahs. If a person forgets to do so and remembers only after a long interval, the opportunity has lapsed. The same applies to the mosque-greeting prayer: if someone enters the mosque, sits down absent-mindedly, and recalls it much later, the greeting has fallen from him. For whatever is linked to a cause must follow that cause without interruption; if a gap occurs, the ruling lapses. Allah is the One who grants success.