Congratulations on finishing 9 days. Mental clarity will happen. Our body chooses what needs most attention and clears that malady. Also depends on how long toxins in your body have been sitting there, what have you been eating before fast, overall mental health. I have done so many fasts in my life, I can tell you each fast is different. In some of my fasts I felt mental alertness rather quickly and in some at a later stage in the fast.
Sleeplessness is a very common symptom during a fast. I do activities, reading, arts crafts, TV, etc. to keep my mind occupied. All you need is rest, stay warm and drink warm water per thirst. Nothing but water goes in your mouth.