I have this all the time. It's part of my aura. I'm not sure if you're experiencing the same thing. But it feels like my brain is encased in jello or something. Extremely difficult to think, I have trouble talking when I get like this. Not so much with the spelling really, but it just feels like my tongue is paralized.
If you have meds to ward off an attack like zomig or one of the other triptans, that's a perfect time to use it. A lot of the time you can stop from getting to the pain and nausea all together.
I hope this helps.
But if there is one thing I know...you need to let your doctor know about it. Because it happened after you started another medication and although I have similar symptoms you might be going through something else. Always better to be safe than sorry.
Hope this helps.