Antiepileptic medications work in different ways to prevent seizures, either by decreasing excitation or enhancing inhibition. Specifically, they act by either: Altering electrical activity in neurons by affecting ion (sodium, potassium, calcium, chloride) channels in the cell membrane.