The first modern study of fasting as a treatment for epilepsy was in France in 1911. Twenty epilepsy patients of all ages were "detoxified" by consuming a low-calorie vegetarian diet, combined with periods of fasting and purging. Two benefited enormously, but most failed to maintain compliance with the imposed restrictions. The diet improved the patients' mental capabilities, in contrast to their medication, potassium bromide, which dulled the mind.
On a ketogenic diet, your entire body switches its fuel supply to run mostly on fat, burning fat 24-7. When insulin levels become very low, fat burning can increase dramatically. It becomes easier to access your fat stores to burn them off. This is great if you’re trying to lose weight, but there are also other less obvious benefits, such as less hunger and a steady supply of energy. This may help keep you alert and focused.