This wont fix all your problems but are you getting enough salt ?
I was having INSANE sleeping issues, waking up, going P, not drinking for 2-3 hours before bed, still waking up, sleeping TERRIBLE, sweating, heart racing etc... muscle spasms during day, sometimes weird blury vision.. brain weirdness/fog before I ate in the morning, etc.
I realized I was deficient in something so I tried magnesium, etc.. then decided to make sure I was getting enough salt and started taking 3-5 1/4 TSP daily of Celtic Sea Salt . I improved greatly. However some of the issues persisted and I kept trying to figure out what other mineral I was low on.
WELL... I ADDED 2-3 1/4 TSP of Iodized table salt to my diet, and after 2 days I was NIGHT and DAY difference! I was sleeping PERFECTLY, not going to the bathroom (Urinating) near as much. After a week I felt like a different person, after two weeks I felt like a new person.
I`m not sure if it's related but after 3 weeks my stomach issues are starting to get better.
I can drink an entire 8oz glass before bed and NOT wake up to urinate.
Eating"HEALTHY" and "FRESH" I was BARELY getting any salt. Somedays I was getting NO salt. I've only had REALLY THIRSTY feeling from too much salt ONCE since I started increasing my salt intake. I know what it feels like, when I used to eat out I'd sometimes be REALLY thirsty at night from too much salt.
Add some SALT, and see if you can get your head/mind feeling better.
For me that really helped shift my mood, and speed up other areas of recovery.
ALSO, running/walking + salt and I feel like anew perosn even if I start feeling down, and tired, and run down, I end feeling MUCH better.