EllisH- That sounds like pure hormones to me, since it in combo with the morning sickness. With the mag supplements, you might try switching to an easier absorbed form of magnesium citrate... There are few different forms out there. I use Magnesium citrate, and I can take tons without having, um, problems.
It's also a matter of building up tolerance, which does happen. You can raise your dose slowly over time, and eventually you'll be able to take enough to knock a headache dead without running to the toilet. Hope that helps. There are really a lot of nutrient deficiencies tied to headaches. Kelp is a really great trace mineral source. It has a lot of iodine, another nutrient found to be deficient in frequent headache sufferers. You might try that as well.
I wanted to add that pregnancy is a time when there is a huge nutrient burden on our bodies. If you aren't taking enough nutrients in, your body will take everything you've got to give it to the baby. I think that is the cause of many of these deficiency symptoms women get when pregnant. It's really important to get extra while pregnant, not only so there is enough for a healthy baby, but so that your body isn't depleted in the process of making one. Okay... So that is my PSA for the day. I'll get off my nutrition highhorse now.
One more thing... I don't think prenatals cut it, just for the record. The RDA is minimum wage nutrition. The standard American diet is very sadly lacking so many, many things. We've got to go above and beyond the recommended norms when pregnant. I know there's a lot of information out there pointing to the dangers in getting too much of any one nutrient... Vitamin A, for instance(the synthetic form is the dangerous one). That's why we need to educate ourselves and dig deeper. Whole, natural, organic, nutrient dense foods are the way to go. And there are definitely some cases where high quality nutrient supplements are needed. I guess I'm just saying I want everybody to have the healthiest pregnancy, birth, and baby possible... Please, please eat well and supplement smartly!