Seizures might not be random, but rather follow daily and monthly cycles in the brain — and cracking that pattern might help doctors better predict and treat epilepsy.

Scientists said they saw a cycle of electrical activity in the brains of their epileptic patients and found a pattern as to where seizures typically fall in that cycle, according to a study in the journal Nature Communications. That information offers clues about when someone with epilepsy is most at risk of having a seizure, so it has the potential to improve medical treatments for those patients if applied to a larger group.

“Epilepsy is defined by the seemingly random occurrence of spontaneous seizures,” the study says. “The ability to anticipate seizures would enable preventative treatment strategies.”

During a seizure, abnormal electrical activity in the brain can cause numerous symptoms, including a loss of awareness or consciousness, changes in the senses, hallucinations, numbness, feelings of electric shocks, drooling, convulsions and difficulty breathing. Some people can feel a seizure coming on. After the seizure, people can be unresponsive, confused, scared or tired, among other lingering effects.

A few dozen people with the condition had their brain’s electrical activity monitored for several years and, within that time, the researchers saw that a certain kind of electrical pattern seen in people with epilepsy cycled in periods between 20 and 30 days. Those periods “are robust and relatively stable for up to 10 years in men and women,” the study said. The team referred to the pattern that increases and decreases seizure risk as “brain irritability,” and notes that seizures tend to occur as the pattern is rising toward its peak.

Patients are also most likely to have seizures at a certain time of day, showing a link to the body’s circadian — or daily — biological rhythm.

“Thus, seizures are organized by underlying biological rhythms that operate over multiple timescales and jointly modulate seizure risk,” according to the researchers.

The scientists did note, however, that the study subjects were receiving therapeutic brain stimulation for their condition, and that may have influenced the rhythms of their brains’ electrical activity.

“One of the most disabling aspects of having epilepsy is the seeming randomness of seizures,” senior study author Dr. Vikram Rao said in a statement from the University of California, San Francisco. “If your neurologist can’t tell you if your next seizure is a minute from now or a year from now, you live your life in a state of constant uncertainty, like walking on eggshells…It may be more useful to be able tell people there is a 5 percent chance of a thunderstorm this week, but a 90 percent chance next week. That kind of information lets you prepare.”