THIS Is Why You Stop Feeling Sleepy the Second You Get in Bed

A super-common sleep problem called conditioned arousal can make you toss and turn.

You’ve been struggling to keep your eyes open all day, staving off yawns during your morning classes, doing everything you can to keep from dozing off during the mid-afternoon slump, and pushing yourself to power through end-of-day activities. And yet, the second you lie down for a night of sweet, sweet sleep, every hint of that exhaustion you battled with all. day. long. suddenly disappears! Ugh. What gives?

This problem is likely something called conditioned or learned arousal, and it’s actually really common, according to TIME. The idea: You’re doing something in bed that’s causing your brain to associate crawling under the covers with being awake instead of with sleeping.

“If someone is a good sleeper, then each night, they probably get in bed and fall asleep,” Philip Gehrman, PhD, CBSM, a sleep-medicine specialist and assistant professor of psychiatry at the University of Pennsylvania, told TIME. “So, when they get into bed, it triggers this auto-response of sleepiness. But if you spend night after night tossing and turning, not being able to fall asleep, then your body associates that with your bed instead.”

How to Fall Asleep Faster

The first step to solving this all-too-common sleep problem: Determine what’s causing you to toss and turn. Have you been messing around on your phone or laptop after you crawl into bed? Are you spending too much time worrying about school after your head hits the pillow? These things could be keeping you awake when you attempt to hit the hay — and, in turn, can cause a relentless cycle of sleepless nights.

The most effective way to treat this type of insomnia, experts say, is undergoing cognitive behavioral therapy for insomnia, or CBT-I. But if you don’t have a sleep clinic nearby — or you’re not prepared to spend the money on sleep therapy — experts say it is possible to try an at-home version of the therapy, either with an app like SHUTi or Sleepio, or by following CBT-I tips from the pros.

“A key part of what we teach people is to keep the bed for sleeping,” Ronald Chervin, MD, director of the University of Michigan Sleep Disorders Center, told TIME.

This means the other part of more sound sleep is keeping all electronics away from the bedroom (a good sleep habit to maintain, anyway) and not hanging around in bed if you don’t feel sleepy. “If you’re awake in bed for 20 minutes or longer, get up and go do something else,” Dr. Chervin said.

Re-training your brain to associate getting into bed with sleeping can take time, Dr. Gehrman and Dr. Chervin said, but maintaining healthy sleep habits (keeping your bedroom at the ideal temp for snoozing, avoiding coffee late in the day, and following a regular bedtime routine) can help.

Now get snoozing!