1 To increase your magnesium, eat whole grains, vegetables such as summer squash, green beans, broccoli, cucumbers, and spinach, and nuts and seeds.  Adult women under 30 need 310 milligrams a day, while women over 30 need 320 milligrams. Men need 400 milligrams before 30 and 420 milligrams after 30.