DISCLAIMER: I am NOT a medical doctor. I am the parent of a child who was on the keto diet. I cannot advise on medical issues.
The ketogenic diet has been around in the medical literature for well over 70 years. It was replaced when modern anti-convulsants became available, even though it had a very good success rate at controlling seizures. The success rate is about 75%- stopping seizures in 50% of cases and reducing them significantly in a further 25% of cases. Most kids can stay on the diet two years, get off it and never have another seizure. The diet works best in children under ten, they are less likely to cheat and eat forbidden foods and can maintain ketosis better than older kids or adults.
The diet mimics the effect of starvation. It has been known for centuries that fasting has a benefical effect on seizure control (there is a reference to this in the New Testament). Doctors at the Mayo clinic came up with a way to induce the effects of starvation (fat burning, ketosis and a change in blood Ph levels) by feeding the patient large quantities of fat and limiting protein and carbohydrate. The diet has to be rigidly controlled as any deviation can throw the patient out of ketosis and produce a seizure.