Speaking of magnesium, I take magnesium as magnesium malate. it's a pricier version of mag. (tartrate and aspartate something or other being other types) but I hear it has a better absorption ("bioavailability") than the others, which may lead you to just expel (diarrhea - ex: "milk of magnesia" is mag. oxide) out a lot of the magnesium, wasting you overall absorption value.
check out
www.globalhealingcenter.com/natural-health/types-of-magnesium/
for a good explanation of different types of magnesium
(I didn't know 'chalk' and Epsom salt are two types

)
this website says mag. orotate is the best form of it
mag. is a heavy metal so it needs something to bind to to make it better absorbable, otherwise it goes right through you as a laxative (milk of magnesia and Epsom salt solution)
maybe the type of magnesium you're taking, through its laxative effects, is disallowing absorption of other nutrients by flushing your system when you poop.
are you pooping a lot? diarrhea? you need a more bio-available supplement.
maybe you're not getting enough mg which would have effect on your energy
mg is needed to help break down B vitamins too, and vit D plays a role in there too, and selenium.
check your magnesium type to see how much absorption is available
boost your vitamin D and calcium
eat some foods rich in selenium, but not too much. you might already eat such foods, but find a list online and check you're at least eating some.
here are some:
Brazil nuts (high in selenium, which you can get toxic on, so don't eat a lot)
sunflower seeds
fish ( tuna halibut sardines flounder salmon)
shellfish (oysters mussels shrimp clams scallops)
meat (beef, lamb, liver pork)
poultry (chicken, turkey)
eggs
mushrooms
grains (wheat germ, oats, barley, brown rice)
onions
I've been eating Cream of Wheat which is a great source for a lot of vitamins nutrients and minerals including selenium, copper, and magnesium! and fluoride folic acid, lutein
but oatmeal is good too, as long as it's not the stuff packed with sugar, but a little sugar isn't all that bad as long as your diet doesn't have a lot of sugar.