They don't. Its not medically possible & not a true story. That's not how it works. For example, a wheelchair bound person with Alzheimer's couldn't forget they can't walk, so then magically walk.
Alzheimer's isn't just about memory loss, its a degenerative destructive brain disease & only gets worse. People with Alzheimer's still have memory recall, just limited as it progresses and it's usually longer term memory but confusion of how those fading memory fragments fit together.
If it's miraculously "reversed" then they were probably misdiagnosed of having it.
I should know, my father recently died of it. He forgot he had it too.