Dear Marioo,
This is what works for me, altho I still fall off the wagon-like I did last weekend.Try to get a good amount of magnesium in your system on a regular basis.You'll have to experiment with the amounts daily, but your system will tell you if you're taking too much. Too loose=too much. Also another daily thing should be about 1/4 cup of flaxseed mixed with anything. I even put it in my cocktail at night sometimes.
Also for me Calcium and cheese are big triggers. So if I'm not running optimaly, I avoid these two things.
I use triple magnesium complex from swanson vitamins.
In an emergency like today-I go for the milk of magnesia. But it takes days to recover from that.
Best of Luck