MAV but no headaches- does "the diet" really help?

Well, I started taking 400 mg of magnesium once a day with a meal and it gives me really bad GI issues. Do you break it up through out the day?