Melanie Griffith is opening up about a serious health condition that she had previously kept private. During a Women’s Brain Health Initiative panel on Wednesday, Griffith revealed that she was diagnosed with epilepsy after having several seizures on a yacht outside Cannes, France.

“I had this major grand mal seizure and they took me to the hospital in Cannes and then brought me back to the boat,” she said, according to the Hollywood Reporter. “And then I had another seizure and I went back. They did the EEG and started to look at it seriously. When I came back [to the United States], I was diagnosed with epilepsy.”

Epilepsy is a neurological disorder that can cause seizures. Griffith said she has been seizure-free for four years now, and credited her medication — and maybe her divorce — for helping to control her symptoms over the past few years.

“I got divorced, which is the real healer for me,” the actress joked on the panel, which also included moderator Sharon Stone and brain health expert Dr. Pauline Maki. No names were named, but Griffith split from actor Antonio Banderas in 2014 after 18 years of marriage. She noted that all of her previous seizures had occurred during times of extreme stress, and that her doctors at the Health Nucleus in San Diego have concluded through testing that she no longer seems to be affected by the condition.

“I’m not stressed anymore,” she explained. A mom of three now-grown-up children, including 50 Shades of Grey actor Dakota Johnson (with whom she shares matching tattoos), Griffith said that she’s thankful she was able to access health care during her struggles. “If I was living in poverty with four kids and I couldn’t make ends meet and I had a f*cking seizure, what do you do?” she asked, per THR. “How does the average person, man or woman, get the help?”

Are you surprised by Melanie Griffith’s diagnosis? Let us know @BritandCo.

(Photos via Frazer Harrison/Getty Images for LACMA + Frazer Harrison/Getty Images for Children’s Hospital Los Angeles)