When you eat carbs, your blood sugar rises. At first it fuels your muscles, then at some point your body has to release insulin to protect itself, keeping your blood sugar low using fat storage. Later, the blood sugar will crash, leading to a lack of energy and brain fog.
There are some hacks in the book to help with this, like walking after eating (muscles take up more of the spike), or eating in order (fiber first to moderate blood sugar, followed by protein/fat, and finally any carbs)
I think a keto diet probably has the same effects, as a consequence of removing simple carbs from your diet.
It might be better to understand this all holistically and manage it with decent nutrition, not just cutting out all <x>.