A fever, a brain injury from an accident, a medical condition — anything that changes the normal pattern of activity in your brain can cause a seizure. It can be scary, especially when you don’t know why it happened.
Epileptic seizures are often associated with particular triggers or changes in your daily habits or routine. Here are some common behaviors and factors that may trigger an epileptic seizure:
• Stress, anxiety, or other emotional issues
• Alcohol or drug abuse or the process of quitting alcohol or drugs
• Change in sleep schedules, feeling very tired, or significant sleep deprivation
• A change in medications, or skipping or missing a dose of anti-seizure medication
• Something that overstimulates the senses, like lights that flash brightly, watching television, playing video or computer games, or working on a computer
• Hormonal changes in women, often from pregnancy or menstruation
• Mental strain, such as from solving complex problems
• If you have diabetes, you could have a seizure when your blood sugar drops too low.
Certain dietary changes may also help decrease seizures. The best-known diet is the ketogenic diet, which focuses on eating a higher ratio of fats. It’s considered a low-carb, low-protein diet. Certain vitamins may help reduce the number of seizures caused by epilepsy. Keep in mind that vitamins alone don’t work.
Many people with epilepsy experience aura symptoms about 20 minutes before a seizure occurs. You may notice unusual smells, see strange lights, or have blurry vision.

Reference:
https://www.webmd.com/epilepsy/understanding-seizures-prevention#1
https://www.everydayhealth.com/epilepsy/preventing-epilepsy-seizures.aspx
https://www.healthline.com/health/natural-treatments-epilepsy#diet4
https://www.epilepsy.com/learn/triggers-seizures