There are 12 different types of magnesium. Anything with citrate tends to be too acid for many people. The easiest to digest is the one from floradix, since it is made from natural ingredients. The taste is relativity easy to get used to. If I take too much I'm running for the bathroom. A funny side effect is it can improve your vision for a few hours.
If your stomach does not like the supplement, it means it's not right for you. Try to find a better quality one. It means researching all the different calcium's, magnesiums, zinc, etc. I wish there was a shorter way, it really does pay off in the long run. Try some different ones until you find one that does not hurt.
You got this!