Thanks for contacting the medical experts at Just Answer.
It is very likely that you suffer from a type of Migraine, or less likely a form of seizure disorder.
If there is any headaches that accompany or follow this, then I think Migraine is more likely.
The best thing would be to consult a medical specialist, get some tests done to rule out seizures, and then take long term anti-migraine prophylaxis medicines,
Dr. Gupta, MD