In her most recent On the JLo newsletter, Hustlers actress Jennifer Lopez detailed a panic attack that changed the course of the rest of her life.

“There was a time in my life where I used to sleep 3 to 5 hours a night. I’d be on set all day and in the studio all night and doing junkets and filming videos on the weekends. I was in my late 20s and I thought I was invincible,” she said.

One day, however, it all caught up with her. Lopez was in her trailer on set when she said she “went from feeling totally normal” to “all of a sudden I felt as if I couldn’t move.” The Marry Me star said she felt “completely frozen,” and that she “couldn’t see clearly.”

It turned out that she was having a panic attack brought on by exhaustion. “I was so terrified I thought I was losing my mind,” she said.

Lopez shared, “I asked the doctor if I was going crazy. He said, ‘No, you’re not crazy. You need sleep.'” It was through this incident, she shared, that she “realized how serious the consequences could be of ignoring what my body and mind needed to be healthy — and that’s where my journey to wellness began.”