There is always the question of whether cooking causes the loss of magnesium in otherwise high magnesium foods. The answer would appear to be, “sometimes.” While many assume that there cannot be any loss as long as the cooking liquid is preserved and consumed (as with soup), and because magnesium is a mineral that cannot be broken downs so easily, there are some exceptions.
Michigan State University has conducted research that suggests the following:
The impact of cooking and processing on magnesium can vary greatly from food to food, since magnesium is found in different forms in different types of food. In some foods, where a greater percent of magnesium is found in water-soluble form, blanching (boiling or steaming for one to four minutes), steaming, or boiling of these foods can result in a substantial loss of magnesium. For example, about one third of the magnesium is lost in spinach after blanching. Similarly, when navy beans are cooked, they lose 65 percent of their magnesium.
In other foods that are rich in magnesium, like almonds or peanuts, there is very little loss of magnesium either from roasting or from processing into almond or peanut butter (as long as the whole almond or peanut is used).
Note that the above includes steaming. When the magnesium is in a water soluble form, it can disappear with the steam. Even with a lid on the pot, steam will escape, though at least some of it can be retained that way. Whether navy beans lose 65% of their magnesium when they are covered or not is something I could not find the answer to. Yet, it seems wise to assume there is some loss.
Spinach is more complicated. Raw spinach contains many phytates and oxalates. While phytates and oxalates are good for you in several ways, they also have the unfortunate effect of inhibiting magnesium absorption. Cooking spinach greatly reduces the phytates and oxalates, but it also reduces the other nutrients, and much magnesium is lost with the water or steam. The million dollar question is whether you lose more magnesium in the cooking than you would from the inhibiting effect of the phytates and oxalates. Such calculations make my head hurt, so I decide by choosing whether I prefer my spinach cooked or raw for each particular meal – and let nature sort it out. It never hurts to have a little variety in your diet.
None of this gives us any strong reason to cook or not cook our foods, but it is good to keep in mind. If you are trying to increase your magnesium levels, try to trap all the steam you can when cooking. If you can’t, just make up for it by eating more magnesium foods elsewhere.