Updated

In theory, getting a good night's sleep is simple: Go to bed and wake up at the same times every day, exercise regularly, skip caffeine and booze late at night and ban TVs from your bedroom. These moves can set you up to get the seven to nine hours of rest your brain and body crave, many studies show.

Of course, if you have trouble snoozing, you've probably tried all this and are still tossing and turning. Hang in there: "With more customized advice, I can almost guarantee that your sleep will improve," says clinical psychologist Michael J. Breus, PhD, author of Good Night: The Sleep Doctor's 4-Week Program to Better Sleep and Better Health.

While we can't march you over to a sleep doctor, we can give you access to top sleep experts—and real-life insomniacs—for out-of-the-box solutions. Here's how to avoid counting sheep or watching 3 a.m. infomercials in the future.

Health.com: 7 Tips for the Best Sleep Ever

Problem #1: You can't fall asleep

Irene Seth of Evanston, Ill., used to lie in bed for hours as her mind raced. "The thoughts weren't clear, but the feelings were—stress, worry about the future and work," said the 46-year-old mother of two. Some 75 percent of Breus' patients say they can't switch off their brains at night—no surprise to any of you who shoot off emails and brainstorm to-do lists even after your head has hit the pillow.

Smart solutions: Get a handle on anxiety by booking "worry time," suggested Sonia Ancoli-Israel, PhD, director of the Gillin Sleep and Chronomedicine Research Center at the University of California at San Diego. Designate 15 minutes—at the same time every day and not too close to when you turn in—for addressing the issues that hijack your thoughts at night: What still has to be done on the renovation? Did I pay the phone bill? "You're reconditioning your brain to think about these things away from bedtime," said Ancoli-Israel. "For 80 percent of people who try it, it works." Then, when you do hit the pillow, practice mental distraction techniques, like counting backward from 300 by threes (really!).

You might also consider trying cognitive behavior therapy, in which you learn crucial ways to change your sleep habits for the better. CBT was deemed to be the first line of treatment for sleep-onset insomnia (that is, trouble falling asleep) in a recent Harvard Medical School study.

Health.com: 7 Bedtime Behaviors That Will Help You Sleep

Inability to fall asleep can also be a body clock issue. "Our circadian rhythms depend on natural light in the morning," said Dr. William C. Kohler, medical director of the Florida Sleep Institute. If we don't get enough, that can keep us from feeling tired later. To help reset your circadian rhythms, buy a light box online—look for one with a brightness of at least 5,000 lux, said Ancoli-Israel—and sit in front of it for 30 minutes each morning.

Note: Medication should be considered a last resort. There's nothing wrong with using an over-the-counter sleep aid once in a while, Breus said. But if it takes you longer than 30 minutes to fall asleep three nights a week for three weeks, that's insomnia, and you should see a doctor to get the best, safest treatment for you.

For Seth, CBT helped by changing the way she reacted to her worries (for instance, she now avoids having stressful conversations right before bedtime). Plus, "I learned to give in to my body's first wave of fatigue instead of staying up," she said. "It has made a huge difference."

Health.com: 8 Natural Remedies to Help You Sleep

Problem #2: You can't stay asleep

Jodie Dawson, 43, could go out like a light every night. "Then I'd wake up at 2 a.m., often sweating, and stay up," the Bethel, N.Y., resident said.

Breus coined the term mommysomnia for new mothers awakened by their babies' cries, but he also uses it to describe being up due to any external sleep disruption—like a too-hot room or the cat climbing on your head. Middle-of-the-night wake-ups can also be prompted by things you ate or drank, certain drugs, underlying medical conditions or stress.

Smart solutions: Surprise: It's natural to wake up during the night, especially in between the deeper stages of sleep. Don't panic if your eyes open—doing so will just keep you from drifting back into slumber.

Next, assess the effect waking up is having on you. "The perfect eight-hour sleep is a myth," Breus said. "The question is, are you getting enough for you?" Yes, the average adult needs seven to nine hours. But that's just an average; if you're functioning fine on fewer hours (i.e., without needing vats of coffee), your sweet spot might be less.

If you aren't feeling rested, then note what's happening when you wake up at night. "Make sure you're not tricking your body into thinking it's time to get up," Breus said—for instance, by peeking at the clock, checking your email or turning a light on. If wake-ups coincide with specific noises or events (such as the heat clicking on or the sun rising), neutralize them by getting a white-noise machine or blackout shades.

Dawson consulted her doctor when she couldn't solve the problem on her own. Tests revealed that she had low levels of progesterone, which can disrupt sleep. Using a progesterone cream alleviated her night wake-ups: "It was a big relief," she said.

Health.com: Which Sleep Style Is Healthiest?

Problem #3: You often feel exhausted after a full night in bed

A year ago, Jennifer Grisafi woke up in the middle of the night choking. "I literally couldn't catch air," said the 44-year-old mother of two from Nashville. Even when she didn't wake, she often snored loudly enough to disturb her husband and felt groggy in the morning. A Google search suggested she might have sleep apnea—a disorder in which the throat muscles relax, causing your airway to collapse or get blocked by your tongue. You stop breathing for 10 seconds or more, possibly hundreds of times a night.

After an overnight stay at a sleep lab, Grisafi was diagnosed with apnea, which affects half of the women ages 20 to 70 in a 2012 study. Apnea puts you at higher risk for heart disease and diabetes—and daytime drowsiness.

Smart solutions: Always sluggish? Kohler suggested keeping a log of what you did during the day and whether you woke up tired. You might learn that you sleep fitfully after watching True Blood or feel invigorated the morning after a spin class.

If you snore or wake up with a headache or dry mouth, you could have sleep apnea. Treatments range from low-tech—raising the back of your bed by 2 inches or sleeping on your side—to wearing an oxygen mask called a CPAP or a dental device that repositions your jaw and tongue to keep the airway open. Losing weight helps, too.

Grisafi now wears a dental apparatus when she sleeps. "It's not supercomfortable," she admitted, but she hasn't had a choking attack since, and, she said, "I feel great."

That's the ultimate goal, whichever of these treatments works for you. Sweet dreams!

This article originally appeared on Health.com.