That sounds fairly similar to the onset of my migraines, and the auras I see. At first my vision just gets slightly blurry, but then I get swirling patterns. Generally that lasts 20-30min, and then the headache follows. I have found that taking a multi-mineral (which does contain magnesium) has reduced how often I get them significantly.