Research using an Apple Watch app to track seizures in people with epilepsy finds triggers are often stress and missed sleep, according to a preliminary study presented at the American Academy of Neurology’s 69th Annual Meeting in Boston.

For the 10-month study, 598 people signed up to track their seizures with an app called EpiWatch built using ResearchKit, a software framework designed by Apple to make it easy for researchers to gather data more frequently and more accurately from participants using iPhone and Apple Watch.

When participants felt a seizure aura starting, they opened the app. Using the Apple Watch’s sensors, EpiWatch recorded participants’ heart rate and movements for 10 minutes. The app asked them to perform tasks to test responsiveness. After the seizure ended, participants were given a brief survey about seizure type, aura, loss of awareness, and possible seizure triggers.

“The data collected will help researchers better understand epilepsy, while helping people with epilepsy keep a more complete history of their seizures,” says study author Gregory Krauss, MD, of Johns Hopkins University and a member of the American Academy of Neurology, in a release. “The app also provides helpful tracking of seizures, prescription medication use, and drug side effects—activities that are important in helping people manage their condition.”

In all, 40% of the group tracked a total of 1,485 seizures, with 177 participants reporting what triggered their seizures.

Stress was the most common trigger, linked to 37% of seizures. Participants also identified lack of sleep as a trigger for 18% of the seizures, menstruation for 12%, and overexertion for 11%.

Other reported triggers included diet, missed medications, and fever or infection. Seizure triggers did not vary by the type of seizure people had.

The study found that stress was more commonly reported as a trigger for participants who worked full-time, at 35%, compared to those who worked part-time, 21%, were unemployed, 27%, or were disabled, 29%.

“Seizures are very unpredictable,” says Krauss. “Our eventual goal is to be able to use wearable technology to predict an oncoming seizure. This could potentially save lives as well as give people with epilepsy more freedom. The data collected in this study helps us take a step in that direction.”

The study was supported by Johns Hopkins University.