Epilepsy can be caused by head injury or by any disease that affects the brain. The best way to prevent seizures is to avoid head injury. You can do the following:
Avoid situations in which a head injury may occur.
Wear seat belts while driving.
Equip your car with air bags.
Wear an approved helmet while skating, riding a motorcycle or bicycling.
Use protective headgear for sports.
If you have an active seizure disorder, it is also important to take precautions to minimize the risk of injury if you have a seizure. For this reason, it is generally recommended that patients do not operate a motor vehicle or other dangerous machinery until seizures are well controlled. In general, this means waiting for at least six months after the most recent seizure.