ok for one thing just since you are not certain about the mag intake, you could try adding another 100mg of your magnesium supplement at a different time of day each day, to see if you notice any improvement.
as for hitting your daily dietary target, you can just use google usually to find amounts of given nutrients per serving.
spinach and swiss chard both provide about 150mg of mag per one cup cooked serving (spinach boiled one minute and drained, or chard boiled three minutes and drained).
brown rice provides about 80mg per cup (compare 12mg of mag in a cup of white rice!)
a 1 cup serving of cooked sweet potato gets you about 30mg.
i don't have time to work out what nutrients might specifically link to your particular symptoms, but figuring out if you have a dietary/supplemental mag issue is a pretty easy first step for now