It is narrated from Hazrat Anas (may Allah be pleased with him) that a man asked the Prophet (peace and blessings be upon him) what is the ruling for a person who forgets to pray or falls asleep? The Prophet (peace and blessings be upon him) said: When he remembers, he should offer it.