Try a product called "Cramp Defense", available on the internet. It has magnesium in it but it also has some other products that "buffer" the magnesium and doesn't mess with your lower tract. I used to wake up with leg and foot cramps all the time but have been taking this product for about two years and haven't once had a cramp and my stomach isn't affected.