The idea behind water spreadsheets was to determine how to synthesize water. It is only fairly recently that people started trying to predict mash pH (beyond Kolbach's simple relationship) from water chemistry. Malt contains a fair amount of magnesium some of it bound to the phosphate in phytin. It would be the phytin that would effect the mash pH, not the magnesium, and it is the reaction of phosphate with calcium (and magnesium) that Kolbach's formula tries to WAG. Thus magnesium is, in a certain sense, already accounted for.
It's easy enough to make small quantities of magnesium chloride from epsom salts and lime if one has access to food grade hydrochloric acid. But I don't see it doing much for one's beer. Magnesium is not generally regarded as flavor positive.