I've had issues like that. I actually DID have something in my brain & had brain surgery to have it removed. I always just assumed my brain fog, etc were related to that. Then I found out I had quite a few allergies, as did my children. After a few weeks of giving up gluten (& the other things that I was allergic to), I began to feel significantly better & think more clearly. I also noticed that while my kids are still kids, their behavior has drastically improved since the changes were made for them. Their listening/follow through on directions seemed to improve. My focus, GI issues & a bit of random discomfort in diff body parts got better. Also, I had several skin issues (eczema, rosacea, breakouts) disappeared. I have had a couple times in the recent past where I unintentionally consumed something I shouldn't have (in ways you don't think about - like lipgloss) & symptoms quickly returned. DH pointed out that I started wearing my VS lipgloss again & that's why I was feeling crummy again. I tossed them all & paid more attention to even bath & body labels & things got better again.
MANY people have a gluten intolerance or allergy in more severe cases. It's often overlooked or mistaken as something else b/c most people assume that since their symptoms aren't GI related, then it wouldn't be what they are eating. Gluten (& other allergies/sensitivities) can manifest in MANY other forms. The best way to find out if that's your issue or not is to do an illimination diet. If you feel better after a few weeks on the gluten free diet, then bingo. If you aren't sure that's why you are feeling better or not, then re-introduce the the gluten after a few weeks. If your symptoms return, then you can bet on that being the problem.
You may also want to consider other issues if you suspect a food allergy or sensitivity. If it doesn't seem to be gluten, it could be another food like dairy. I believe there are a lot more people out there with gluten or dairy allergies than are even aware of that being their issue.