Jennifer Aniston.

For too long, heading off to bed felt “almost like walking the plank” toJennifer Aniston.
The superstar actress, 53, has dealt with years — even decades —of sleep problems, from insomnia to sleepwalking to sleep anxiety, making her dread another night of “counting cracks in the walls,” she tells PEOPLE.
“I think it started somewhere in my 30s or even earlier, but you just don’t start to notice the effects of a lack of sleep when we’re younger because we’re so invincible,” Aniston says. “It began as something that I would just accept and then all of a sudden you realize the effects of your lack of sleep and how it affects your day and your work and your mind function and your physique.”
Aniston would try to go to sleep and end up watching the clock, “a big no-no,” because it just made her focus on how much time was passing and how many hours of shut-eye she was missing.
“And the more I worry about it, the harder it is to fall asleep,” she says.

TheFriendsstar was even sleepwalking at times, but has thankfully stopped — as far as she knows.
“The body is saying, ‘Now don’t go out and set the alarm off again, okay?’ "
Still, Aniston put off getting medical help, thinking her sleep problems weren’t enough of a priority. But in the last few years, she realizedshe needed a real fixfor her insomnia.
RELATED VIDEO:Jennifer AnistonOpens Up About Her Life Now: ‘I’m in a Really Peaceful Place’
Aniston got help from a doctor, something she “absolutely recommends people do,” and that’s why she joined in on a new campaign,Seize the Night and Day, where people can find news and advice for dealing with their own sleep issues.
Along with the medical help, Aniston now finds that having a nighttime ritual makes a huge difference. She gives herself time to wind down, does some stretches or yoga and leaves her phone out of the room. She also tries to “make bedtime the same every night, which is challenging for us actors, because if we’re on a movie, the schedule is all over the place.”
But one thing Aniston is not willing to give up, even if it means better rest, is sleeping inbed with her three dogs.
“It’s just too cozy when they cuddle!” she says. “It’s worth it. Especially since Chesterfield [her 1½-year-old dog] is not a puppy anymore. Now he’s just a sweet, deep sleeper. I actually envy his sleep sometimes.”
source: people.com