I have high mental clarity currently. I had high mental clarity when I went to sleep. I did have issues sleeping, but this is nothing new on a ketogenic and fasting state.
From the vast research I've done, sleeping may be more important on a high-insulin-fluctuating diet. However, when the body and brain are fat adapted (less insulin), there is a constant fuel source. The brain operates very efficiently on ketones. Also, important to note that when fasting and doing keto, you must supplement electrolytes.
There is a lot more to all of this and the notion behind the importance of sleep. Anecdotally, diet proves to be more important for me. Do your own research.