Doctors may sometimes recommend surgery to prevent or reduce epileptic seizures.