Can memory loss get better when you FINALLY find out you have epilepsy?

My mother has been struggling with severe memory loss and what they thought was dementia for a few months now. She is only 52. They finally figured out that she has epilepsy and she is starting treatment. They said she has been having lots of small seizures, I am wondering if her memory will get better or if that part of her brain will be permanently damaged. Anyone have experience with this? Thanks!
Update: We just found out that she has epilepsy because apparently she had viral encephalitis and no one knew it. Well that cured itself but now she has a few lesions on her brain. So now I don't know if it's the lesions causing the memory problems or the epilepsy…or both! If it's the lesions, then it won't really get better will it? It seems to be getting worse because now she doesn't remember my kids. 🙁