Magnesium is best taken with calcium and vitamin D as both are used in the uptake of magnesium.
I have found that processed foods, alcohol, caffeine and sugar all make me worse, but magnesium gives me the will power to change that lifestyle that caused the problem in the first place.
I don't know about quack studies but for the cheap price and quick turnaround (3 days for small effect, 2 week for a large scale shift) it's a simple thing to try.