We’ve all been there: You fall asleep just fine after a long day of work, but at around 2 a.m., something happens. You’re suddenly wide awake, and no matter how many sheep you count or glasses of warm milk you down, nothing seems to get you back to bed. While most people associate insomnia with the inability to fall asleep in the first place, it also applies to people who find themselves unable to fall back to sleep after waking up in the middle of the night.

According to the American Academy of Sleep Medicine, 30 to 35 percent of U.S. adults experience "brief symptoms" of insomnia, while 10 percent suffer chronically, with symptoms three or more times a week for at least three months. Though some severe cases may prompt a visit to the doctor, the occasional occurrence can be helped with these five science-backed tips.

1. Put your phone away.

When you’re trying to fall back to sleep in the middle of the night, one of the biggest obstacles in your way is light. This is especially true when it comes to that blue light from your smartphone shining right into your eyes. "Electronic devices emit light that can keep you up—especially the ones you hold closer to your face, like a mobile device," W. Christopher Winter, director of the Martha Jefferson Sleep Medicine Center, told Men’s Health.

The temptation to scroll through social media or a few news sites when you can’t sleep can be hard to resist, but yielding to it can turn a 15-minute sleep interruption into an entire night lost. Do your brain a favor and leave the phones, tablets, and e-readers off.

2. Ignore the clock.

While you’re ignoring newsfeeds and social media, you’re going to want to stay away from your smartphone’s clock, too. In fact, don’t worry at all about the time when you’re trying to fall back to sleep, because it’s only going to increase your stress.

Think about it: If you need to be up for work at 6 a.m., and you randomly woke up at 4 a.m., you’re likely going to do the classic, “Well if I fall asleep now, I’ll get two more hours of sleep before my alarm goes off.” Then what happens? Nothing. Then you set another deadline, and chances are you’ll get nowhere with that, too. Soon it’s 5:59 a.m. and you’re still awake, thanks to all the undue stress you put on your body to fall back asleep by a certain time.

"The problems occur when people's minds start to race and they start to worry about things," neurologist Brian Murray told CBC Canada. "Looking at the clock will make people feel anxious about not falling back to sleep. That causes the body to release fight-or-flight hormones, which interfere with the sleep onset process."

Don’t worry about the time—that’s already out of your control. Instead, concentrate on practical tips to solve the problem.

3. Don’t be afraid to get up.

Still can’t get back to sleep after 20 minutes? Well, it might to time to get up—for the moment, anyway. In an article for the Huffington Post, James Findley, Ph.D., clinical director of the Behavioral Sleep Medicine Program at the University of Pennsylvania, recommended people get out of bed and do some light busy work after that initial waiting period.

Among the activities he recommends are stretching, light reading, or a puzzle—basically, do anything to get your mind off the fact that you can’t sleep, and with any luck, that will be exactly what you need to doze back off.

4. Do some breathing exercises.

A tense body likely won’t be falling asleep anytime soon, so you’ll want to make sure you’re actually relaxed while in bed. One way to accomplish this is to do some deep breathing—in through your nose and out of your mouth in a rhythmic cycle. According to Erich P. Voigt of New York University, you can also help lull your mind to sleep by repeating a common phrase or word—like “relax”—in rhythm with your breathing.

5. Focus on what relaxes you.

Sleep experts Ilene M. Rosen and Shalini Paruthi both say that one of the keys to falling back to sleep in the middle of the night is to focus on mental images of what's most relaxing to you. For them, it was imagining themselves on a beach or back at a favorite family vacation spot. "I can feel the Sun’s warmth on my skin, I can hear the ocean waves. I can smell the saltiness of the sea," Paruthi said. This type of guided imagery—where you carefully imagine every detail of a favorite memory or activity to get your mind off your sleep woes—is also recommended by the National Sleep Foundation.

For you, these images could be anything—thinking about a favorite movie, imagining yourself at a Yankees game, or remembering some of your favorite books. It's all about whatever memories or thoughts relax you. So instead of stressful newsfeeds or the mocking hands of a clock, your mind will be on a beach, in your favorite restaurant, or simply remembering the sights, sounds, and smells of a perfect day—and hopefully, you'll be back to sleep before you know it.