It’s that time of the night again: you set your alarm, tuck yourself in and turn out the lights. But maybe you don’t fall asleep right away. So, you pick up your phone, take a little scroll through Instagram or play a few rounds of Candy Crush, and maybe even make a move in Words with Friends.

Suddenly, it’s two in the morning and now you’re really wired.

That was me pretty much every night until one strange day last spring.

It had been a long day, mostly outdoors in the rain, and when I got home I took a hot bath, then lay down and started a new book (a hardcover that, compared to the iPad I’d become so accustomed to, felt insultingly heavy). I wasn’t planning on falling asleep, but the next thing I knew the sun was hitting my eyes. Before I was even fully awake I was feeling around the nightstand for my phone. I don’t even know what I wanted it for — I just knew I needed it. I felt the charger cord, followed it to its pointy end, and oh my god, where is my phone?

I snapped up in bed, disoriented and concerned. My phone: Was it lost? Was it hurt? Was it *gulp* dead?

The phone was fine (phew!) still in my purse, clinging to five percent battery life. I plugged it in and went back to bed. It was Sunday, after all, and it was only 6 am.

But I wasn’t tired. I was … what was this feeling … I was rested?

I called it a fluke and carried on with my nighttime iPhone and iPad usage. My sleep life had been sucky for years, and though I’d caught glimpses of news articles claiming that blue light (the type of light emitted from most electronic devices) can cast evil spells on your brain, I figured that since I’d been having insomnia long before I owned a smartphone (I was 33, a smartphone owner for 6 years, and an insomnia suffer for at least 15) — the smartphone wasn’t a factor.

But then it happened another night about a week later. I started reading the book (the same big lug, an autobiography that let’s just say was on the drier side), and bam! Out like a not-so-blue light. So I decided to give it a shot: I’d forego the screens and opt for the once beloved and until recently, totally forgotten pastime of reading a physical book at bedtime.

My brain was none too pleased at first. I kept setting the book down almost inadvertently and reaching for the phone. I realized that in order for this to work, I had to relocate my phone from the nightstand to the floor. That way I could still grab it when the alarm went off, but it wouldn’t be within reach of my reflex-happy arm.

Get the better newsletter. This site is protected by recaptcha

Within a few days, the difference was clear. I was falling asleep faster than normal and without much of the typical tossing and turning. When the alarm went off in the morning, I wasn’t particularly thrilled, but the task of getting up didn’t seem quite so impossible. I wondered: Was reading actually helping me sleep? Or was it merely the elimination of screens? Was it both?

Reading can put your brain in a passive mode, so you can fall asleep before anxious thoughts fire up.

To learn more, I talked with Dr. Steve Kay, a professor of neurology at USC who has done extensive research on circadian clocks (or as he calls them “the amazing time pieces within us that help wake us up in the morning, make us sleepy at night and ensure we coordinate eating with activity”).

He wasn’t surprised to hear that I was sleeping better after removing screens from my bedtime ritual, noting that the positive effects can be almost immediate.

“Looking at tablets or smartphones can actually cause significant sleep disruption,” said Kay, adding that in clinical sleep studies, blue light has been found to delay the moment of falling asleep, reduce REM and bump back the circadian clock so that people wake up later.

“When your eye is exposed to blue light, your brain suppresses the production of melatonin — the hormone our brain produces at night that normally rises in early evening, peaks in mid-night and then goes back down,” said Kay.

The presence of any artificial light at night can potentially screw up your sleep cycle, but blue light has been proven to be the most disruptive. This partly explained why the dim desk lamp I was now using to read by at night wasn’t bothering my brain. The warm, 60-watt light it produced wasn’t nearly as harsh as blue light.

Whether reading at night can benefit your sleep is a more behavioral, individual question.

All this information affirmed that I was falling asleep quicker and more deeply because I’d quit blue light at night. But what about the reading and its hypnotic effect? Was there any science to back up that?

Evidently there’s not as much clinical science to support the idea that reading can help you fall asleep, and “whether reading at night can benefit your sleep is a more behavioral, individual question,” said Kay.

To delve deeper on reading in particular, I talked with Dr. Richard Castriotta, the medical director for Memorial Hermann Texas Medical Center Sleep Disorders Center.

“What happens is this: When you are reading (so long as you’re not reading something that gets you riled up), your mind focuses on the content, rather than on other thoughts that could be arousing or aggravating,” explained Castriotta. “The brain can become passive, which is ideal for falling asleep.”

A common problem among people who experience insomnia, myself included, is the sensation of racing or anxious thoughts. Castriotta noted that this type of thinking can produce adrenaline and cortisol (the latter has been nicknamed “the stress hormone”). Once these hormones kick in, your body may lapse into a fight-or-flight mode, making sleep hard to come by. Reading can put your brain in a passive mode, so you can fall asleep before these thoughts fire up.

That I was reading a book that wasn't exactly a page-turner was key, Castriotta said. If you can’t put a book down, he strongly advises that you don’t curl up with it before bed — not if you have trouble sleeping anyway.

That leads us to a pretty important point: If you don’t have trouble sleeping you really don’t need to worry about any of this! Yes, you can go right on dilly-dallying on your smartphone or laptop all evening long. This is because while everyone processes the blue light from electronic devices in the same part of their brain, not everyone is quite so sensitive to it. Castriotta likens it to the consumption of caffeine.

“Some people metabolize coffee faster than others, and are able to drink it in the evening and sleep fine; other people can’t even have a cup of coffee in the morning or they won’t be able to fall asleep that night,” said Castriotta. “It really just depends.”

Now, if you’re like me, and you have a history of insomnia, you definitely want to cut out blue light at night. Blue light can only fan the flames of bad sleep.

But if you’re just not digging the idea of putting your smartphone away for the night, the good news is that the latest versions of iOS and Android include night mode, a setting that turns the screen’s light from blue to a softer pink light. Both Kay and Castriotta say that night mode settings pretty much solve the problem of blue light.

Does this mean I can start using my smartphone at night again? Or reading on my iPad? If I just want to dodge blue light, then sure. If I actually want to stay focused and have my brain stay passive, then no.

“I love to get on my iPad at night and read a science paper, but pretty soon I’m reading an email, then onto games,” said Kay. “These devices are designed to entertain us and they do a great job.”

I know it’s all too easy to get distracted and click on Facebook or any of the multitude of ridiculous games (Candy Crush was the one I played the most, but note that I also frequented Hungry Shark and Dead Trigger — the names alone indicate these were hardly lullaby-like). So, I’ll be keeping my iPhone on the floor (it is perched on a pair of very cute shoes that I never wear), my iPad in the drawer and the books on my nightstand, within reach of that reflex-happy arm.

Ready to Get More Zzz’s? Read These and Rest Better

Want more tips like these? NBC News BETTER is obsessed with finding easier, healthier and smarter ways to live. Sign up for our newsletter and follow us on Facebook, Twitter and Instagram.