High CO2 levels in your home and vehicle can cause those symptoms. I picked up an Exectec CO2 meter, best 400 bucks I ever spent.
Vehicles with a recirculate setting, I learned, do not bring in ANY air at all from outside, so on long commutes CO2 levels in my truck were hitting 1500 to 2000 ppm, but typically won't cause many issues in most, head aches, anxiety, anger. Note: I can easily tell when CO2 hits 600 PPM.
In your residence, newer structures NEED fresh air from outside they're just too air tight, compiled with what ever else you live with, carpeting, drapes, furniture, plywood, particle board, and little fresh air from outside, took days to clear my head sometimes. To make matters worse, I have a natural gas cook top and no outside vent, just the grease trap vent, so just cooking a pot of spaghetti, I learned, would spike the CO2 meter into the 3k ppm in less than an hour.
Symptoms:
Memory issues
Head aches
Exhausted but can't sleep
Hip joint pain and radiating pain in femurs when laying in bed more than 2 or 3 hours
Wake up with racing heart, sweating, palpitations
I created a fresh air input from an old computer rack fan, filter outside air with a big allergy filter for an HVAC, more area = less resistance, resolved the heavier symptoms in 15 minutes, everything else was prefect in 2 days.
A couple other tricks, pure O2 works to clear you head quick but note the safety hazards that come with it, and a great short term trick I learned for taking certification tests: Vassopressin nasal spray, not sure why and I didn't get the script for what it's intended but I'm talking INSTANT clarity.