What is Topamax? Topamax is used alone or with other medications to prevent and control seizures (epilepsy). This medication is also used to prevent migraine headaches and decrease how often you get them. Topamax will not treat a migraine headache once it occurs. If you get a migraine headache, treat it as directed by your doctor (such as by taking pain medication, lying down in a dark room).