We hear it time and time again: If you want to sleep well, you gotta ditch the screens before bedtime. All that late-night scrolling and streaming, according to research and sleep experts, keeps your brain alert and stimulated, which can delay when you fall asleep and prevent you from getting quality rest. The light that your electronics emit essentially screws with your body clock and sabotages your sleep. The ubiquitous advice is pretty straightforward—stop using your devices an hour or two before bedtime—but just because we know that doesn’t mean we’ll actually do it. I, for one, am well aware that I shouldn’t be scrolling through Instagram or catching up on my current favorite show right before I go to sleep, but I’d be lying if I said this wasn’t part of my nightly routine. I also read on my Nook up until the very minute I feel myself dozing off. I can’t seem to escape screens, so I don’t know how I’m supposed to abandon them entirely during my precious evening unwind time.Turns out, I might not have to. (Phew!) According to Jade Wu, PhD, a board-certified behavioral sleep medicine specialist and author of the new book Hello Sleep, there’s a world in which you can enjoy your screens at night without totally derailing your sleep schedule. You just have to make a few tweaks to your daytime routine first.Get as much light as possible during the day. Dr. Wu’s first tip is to make sure you’re exposed to a lot of light during the day. To get into why this matters, you have to first understand how your sleep-wake cycle, or internal body clock, works. Melatonin—a hormone that regulates sleep—ramps up in your body in the evenings, stays at high levels during the night, and winds down in the morning and throughout the day. “Melatonin is a time-keeping hormone that tells your body when it’s time to be sleepy and it naturally responds to the amount of light in the environment,” Dr. Wu tells SELF. When there’s little light, your brain knows it’s nighttime and releases melatonin, making you feel drowsy. If you’re around a lot of light—whether that’s through actual daylight or artificial light from a screen or lamp—your brain thinks it’s daytime and suppresses melatonin, keeping you alert and awake. Research shows that the brain needs a big contrast in light—during the day versus the night—to keep your body clock on track, Dr. Wu says. If you’re outside all day, for example, and come home, get under the covers, turn off the lights, and read a book on your tablet, there’s still going to be a huge difference in the amount of light you’re exposed to. In that scenario, your nighttime screen use won’t interfere with your sleep as much as it would if you were working inside with the curtains closed all day. Essentially, your brain keeps track of how much light it was exposed to throughout the day, according to Dr. Wu. “If, five hours ago, there was a lot of light, and now there’s some light from your screen but much less, the brain will still know that it must be evening now, even though there’s still light coming through,” she says. Unless you’re a park ranger, say, you probably don’t spend most of your waking hours outside, but there are other ways to increase your daytime light exposure. Sit by a window, go for as many outdoor walk breaks as you can, and use bright lighting in your home office space—again, the more light you can get during the day, the less disruptive your screens may be, Dr. Wu says.Turn up the lights at dinnertime.Increasing the amount of light you’re exposed to in the early evening, around dinnertime, can also soften the negative effects of late-night screen use, Dr. Wu says. If, like me, you’re a bit hooked on your devices, she suggests making a point to turn up your lights a few hours before your bedtime (around 7 p.m. if you turn in at 10, for example). You want to be in sleep-inducing dim light a couple of hours before bed, though, so a short burst of bright light is the goal here: Go outside and watch the sunset if you can, or brighten the kitchen lights as you cook or eat dinner. “Earlier in the evening, you’re briefly injecting yourself with some light so that your body is prepared to make a contrast later in the evening, when there is going to be less light,” Dr. Wu explains.