The multihyphenate shared why she prioritizes her sleep in a recent newsletter.

Close Up of Jennifer Lopez

PHOTO: GETTY IMAGES

The secret to Jennifer Lopez’s mental and physical well-being is simple yet elusive: She insists on getting seven to nine hours of sleep each night, she revealed in a recent On the JLo newsletter blast.

ICYDK, Lopez has a newsletter fans can subscribe to, in which she shares details about her personal life (yes, it’s where she announced her engagement and marriage to Ben Affleck). Among other topics, her recent newsletter focused on the importance of sleep, something the 52-year-old megastar learned the hard way in her 20s.

“There was a time in my life where I used to sleep three to five hours a night,” she wrote. “I was in my late 20s and I thought I was invincible.” That is, until one day when she had a panic attack due to lack of sleep, she explained in the newsletter.

“I couldn’t see clearly, and then the physical symptoms I was having started to scare me, and the fear compounded itself,” wrote the Marry Me star. “Now I know it was a classic panic attack brought on by exhaustion, but I had never even heard the term at the time,” she added. Lopez’s security guard took her to the doctor, and she was “terrified,” she explained. “I thought I was losing my mind. I asked the doctor if I was going crazy.”

J.Lo wasn’t “going crazy,” but she was extremely low on sleep, which can exacerbate anxiety, according to The Sleep Foundation. And since stress and anxiety can cause sleeplessness, it can quickly become a vicious cycle. “The later we go to bed — provided we have to get up at a specific time — the greater the stress of poor or inadequate sleep, which can have very real effects on our bodies over time,” Chris Winter, M.D., and medical director of the Martha Jefferson Sleep Medicine Center in Charlottesville, VA, previously told Shape.

At the time, Lopez’s doctor advised she get seven to nine hours of sleep each night, avoid caffeine, and prioritize exercise to balance out her workload, she wrote in the newsletter. “I realized how serious the consequences could be of ignoring what my body and mind needed to be healthy,” wrote Lopez. “That’s where my journey to wellness began.”

Getting her sleep proved to be a great move not just for her health, but also for her appearance, she explained in her newsletter. “I think of sleep like a little time machine. 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,” she wrote.

“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.”

While looking 10 years younger after a single night of sleep is certainly an exaggeration — even for Lopez — there is some validity to her claims that sleep is related to appearance. “There is a such a thing as beauty sleep,” says Michael J. Breus, Ph.D., a clinical psychologist, board-certified sleep specialist, and Purple’s Chief Sleep Officer. “As we age, lack of sleep affects us more deeply and shows up more prominently on our faces,” he says, adding that this explains why dark circles and fine lines may appear later in life, despite late nights in your twenties.

Plus, sleep allows the skin to produce collagen and hold water, which leaves it “moisturized and supple,” Dr. Breus adds. Lack of sleep can also do a number on your immune system, “leaving one vulnerable to rashes and skin-related problems,” he tells Shape.

Of course, sleep isn’t Lopez’s only resource to keep her looking and feeling her best. It’s just one of her “5 Ss,” along with sunscreen, serums, supplements, and (vivir) sano, which means healthy living in Spanish, she explained in her newsletter.

It’s no secret Lopez has access to all kinds of beauty products and wellness treatments, but prioritizing sleep is an affordable way to try one of J.Lo’s tips for looking and feeling your best. Ready to rest up? Get expert tips for getting more (and better) sleep.