hanna
I would suggest to do a search on The Truth in Medicine forum, though it is closed it has a good archive.
I always used magnesium malate and it worked for my leg cramps. I just tried it though I don't know how much to take.
Now I have changed to a new product magnesium l-threonate, what they call "brain magnesium", it probably needs more research. It has worked for my leg cramps too. The only thing I add daily is 2-3 pinches of
Epsom Salts (=magnesium sulfate) for the bowels. I love ES good for bowels (don't take too much because you then have to stay close to a restroom) and my gallbladder. Some people take it for their heart, search SouthernBelle's posts, she posted 11 years ago and is still taking it 1/4 tsp daily in her drinking water.