Ketosis results in a steady flow of fuel (ketones) to the brain. And on a ketogenic diet you avoid big swings in blood sugar. This often results in the experience of increased focus and improved concentration. A lot of people specifically use keto diets specifically for increased mental performance.