it's likely your immune system. you don't have to have bacteria in your brain to have brain issues. When the immune system goes after borrelia, it produces a type of antibody that sometimes mistakenly binds to the coating of the neurons.
/www.ncbi.nlm.nih.gov/pubmed/15652419you have neurons in your brain, so they get "tagged" by the antibodies produced by your B cells and then some T killer cells get into the brain through the BBB especially when an infection is present the BBB is inflamed and becomes permeable. T cells in the brain start to "eat" your tagged neurons which gives you a constellation of ugly neurological symptoms very much like MS.
people just think that if you have brain problems then the bacteria has reached your brain in large numbers and that's it ... it's not always true. this may have happened later because your immune system is now able to mount a more adequate immune response against the pathogen than it did before you started medication.
you could try melatonin, it helps with brain detox and helps sleep. melatonin is an antioxidant.