One of the best night’s sleep in recent memory was when I was engrossed in a print edition of the Harry Potter series. I recall falling blissfully asleep to dimly lit paper pages of adventurous wizards and waking up with a surge of sustained focus. At the time, I attributed my refreshing sleep to the joyous relaxation of a good book before bed.

But, then I discovered that exposure to nighttime artificial light — including, possibly, the iPhone I would normally read on — has been wreaking havoc on humanity's natural sleep cycle. Most recently, researchers at Harvard Medical School found that volunteers who dozed off to e-readers experienced less REM sleep, a vital portion of deep sleep associated with improved cognitive functioning.

The study was sort of a bummer

The study was sort of a bummer; reading before bed is one of life's little pleasures, and the paper book is going the way of the steam engine, at least for me. The news reports seemed like we had to choose between reading and a good night's sleep.

Fortunately, there are a few cheap solutions that can take the sting out of artificial light. My favorite use orange light, which doesn’t trigger our brain's alert system in the same way that a brightly lit blue sky does. There are various products, such as special lighting and software that turns computer monitors a brownish hue, but I use something simpler: "blue-blocker" sunglasses.

The sun as both Ambien and alarm clock

The key to using these tools properly is to understand the timing of our natural sleep rhythms. Humans are born with a pre-programmed sleep setting tethered to the setting of the Sun. As the sky fades from bright blue to dim gold, our brains secrete hormones to gradually drift off into restful slumber. Eight hours later, Earth's natural dimmer turns up the brightness and awakens us to a new day.

Our light sensitivity is so finely attuned that it even responds to moonlight, the only major source of the blue spectrum light at night prior to the industrial revolution. The natural world is affected as well. As the full moon peaked, nighttime became more raucous, as animals hunted and fornicated under the brightly lit nighttime sky. A study found that on average, people fall asleep about five minutes later during a full moon and get 20 minutes less overall sleep.

Edison's invention changed nighttime forever

But then, Edison's invention changed nighttime forever. Street lamps flooded cities with 24 hours of artificial sunlight. We worked more regimented hours and — slowly — we become part of a social evolution that created one big unnatural block of nighttime sleep.

Humans were probably almost unaware that their habits were changing. "As to whether people were aware of the impact of artificial lighting on their sleep, I've not seen any evidence that they were," says Virginia Tech sleep historian Roger Ekirch. As computers flood our bedrooms with more and more artificial light, many have not noticed how their sleep gets worse and worse.

A simple solution: tint light orange

If blue light tells our bodies to wake up, there’s a simple solution: use red light instead. That’s what the American Medical Association recommends. After warning of the horrendous impacts of artificial light-induced sleeplessness (potential carcinogenic effects related to melatonin suppression, obesity, diabetes, depression, mood disorders, and reproductive problems), the AMA says that "this effect can be minimized by using dim red lighting in the nighttime bedroom environment."

There are various products on the market designed to reduce ambient artificial light pollution. F.Lux is a free software program that filters blue light from computer screens. "Smart bulbs" automatically dims light bulbs with the setting of the sun. At the Consumer Electronics Show, health tracker startup, Misfit, has launched a smart bulb that is timed to change colors with a user's sleeping patterns.

The best solution is also the most low-tech

But the best solution is also the most low-tech: "blue blocker" sunglasses. These awkward, wide-lens, orange-tinted sunglasses look like they fell out of a Miami Vice fan club for cataract patients, but they work wonders. Without blue blockers, study participants experienced a 46 percent reduction in the brain's sleep chemical, melatonin. As such, they've been successfully used to improve ADHD symptoms in sleep-deprived youth. Another study found that they "may be useful in adolescents as a countermeasure for alerting effects induced by light exposure through LED screens."

I was persuaded, so I'd started wearing blue blockers at night a few months ago after reading some initial reports about the effect of artificial light on sleep — but I’d never tried to quantify their effectiveness. After reading the Harvard study, I decided to see whether they were actually working.

A self experiment

I decided to ditch my blue blockers for a night and measure the change in sleep patterns using my Basis Peak band. (It's worth noting that I'm attached to my laptop or iPhone until the very last minute I drift to sleep every night without fail.)

During the night I ditched my blue blockers, my Rapid Eye Movement (REM) deep sleep took a big hit. Just as participants in the original e-reader study experienced, my REM dropped about 5 percent. Considering I usually get around 30 percent on a good night and 19 percent on a bad night, that's a serious impact.

My REM dropped about 5 percent

A few caveats: It’s a sample-size of one (me), so this is more of an attempt to put some numbers behind the drowsiness-inducing effects I felt intuitively. It's also possible the placebo effect played a role — that's when a person is so convinced the glasses will help with sleep that they do. Some studies have found that as much of half of the effect of sleeping pills are simply placebo.

In any case, the feeling of sleepiness that blue blockers cause is reason enough for me to keep wearing them. While wearing the glasses, I feel a natural sleepiness wash over me in about an hour. If, for some reason, I have to take the blue blockers off before I go to bed, it feels like a jolt of coffee. My brain immediately wakes up a bit; blue light is caffeine for the eyes.

An easy fix for screen insomnia

Blue blockers are a delightfully simple, low-tech solution — no fancy smart bulbs or software needed. It also doesn't matter that I live in a city constantly surrounded by street lamps and retail shops that flood my room with blue light through the cracks in my curtains.

I use other tech as well. I installed F.lux on my Mac, which starts dimming my screen at sundown. It's a nice way to mentally prepare my body for rest at the proper time.

In the near future, smart light bulbs may automatically dim the lights in our house to simulate the rising and setting of the sun. Until then, my $15 sunglasses are my new bedtime companion, because no technology should get in the way of falling to sleep with a good book.