Celebrities. They’re just like us! Though their lives may look glamorous, even Hollywood’s biggest stars suffer behind closed doors.

Jennifer Lopez recently got candid about her experience having panic attacks. With so much on her plate, there was a point in her life where she was rarely getting even close to the proper amount of sleep a night—3-5 hours tops, vs. the standard 8 or 9 hours she should’ve been getting. As a result, she felt awful during the day.

When she was in her late 20s, that might’ve worked out okay, but as she got older, she felt more and more unable to move. “I was completely frozen,” she said. “I had made my work such an all-consuming priority and let my own self-care needs go completely (even as simple as sleeping or taking ten minutes to just relax). I found myself feeling physically paralyzed, I couldn’t see clearly and then the physical symptoms I was having started to scare me and the fear compounded itself.”

At 52 years old, Lopez says she now knows she was experiencing “a classic panic attack brought on by exhaustion,” but at the time, she wasn’t sure what was happening.

“My security guard on set came in and picked me up and drove me to the doctor,” she said. “By the time I got there, I could at least speak again and I was so terrified I thought I was losing my mind. I asked the doctor if I was going crazy.”

The doctor told her she was, in fact, not crazy, and that she needed to get more sleep. He also suggested to stop drinking caffeine and making sure she exercised daily. “I 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,” she said.

Now, Lopez finally is able to get the shut-eye she needs to feel good each day. “I think of sleep like a little time machine,” she said, “You lay down and you go into a space where you preserve yourself and then you come out a new, younger person than you were before. Sometimes I wake up and say, ‘Wow! I just lost 10 years off my face!’ That’s what a good night’s sleep can do for you, and it accumulates over time.”

Learn more about the history of Lopez’s panic attacks and how she overcame them in the video below.

Did you know that Lopez suffered from panic attacks, even back in the 90s? How much sleep do you get a night?