Jet lag: the awful feeling of malaise after suffering during a red-eye flight, tossing and turning in your stiff seat, hoping desperately for some shut-eye. After a few sleepless hours, you’ll walk into a new time zone with an aching neck, stomach problems, and fatigue that may last you days or even a few weeks.

For travelers, jet lag can be quite a pain — and has even been shown to contribute to health problems. Frequent changes in the biological clock can damage gene rhythm, as well as increase the risk of cancer, diabetes, and even obesity due to their ability to impair our gut microbiomes. So finding a cure for jet lag — or at least some treatment — would serve plenty of travelers.

Scientists have investigated various treatments for jet lag in the past; one study found that Viagra may help alleviate the malady. Other remedies include drinking plenty of water and giving yourself one full day of rest.

Then there are the Re-Timer glasses, which employ light therapy to get your circadian rhythms back on track. Some airplanes have even designed their interiors to help reduce jet lag by including LED lights that resemble the sun’s natural rays to help trick the body into maintaining its biological clock.

But new research delves even further into this idea of light therapy, or light exposure, as jet lag prevention/treatment. The study, published in the Journal of Clinical Investigation, found that flashing light therapy during sleep could help your body adjust better to time changes.

The researchers posited that light therapy would be most effective at night, during a person’s sleep, because circadian rhythms are more sensitive to light during this time. The brain can detect light (even through closed eyelids), which can change your circadian rhythm (which is why you’re more likely to wake up when the sun is shining through the drapes than if you’re enclosed in a dark space).

Instead of exposing a person to continuous light, the researchers experimented with flashes of light while 39 participants aged 19 to 36 were on a sleep routine for two weeks. While sleeping in a lab one night, some of the participants were exposed to continuous light for an hour, and the others were exposed to two-millisecond light flashes, 10 seconds apart, for an hour. As it turned out, those who received light flashes experienced an onset of fatigue and sleepiness that was delayed by two hours compared to those exposed to continuous light who had a delay of only 36 minutes.

Why would flashes of light, similar to camera flashes, all night help prevent jet lag? The researchers explain the physiology behind it: “The first is that the cells in the retina that transmit the light information to the circadian system continue to fire for several minutes after the stimulus — in this case, flashing light — is no longer there,” Jamie Zeitzer, assistant professor of psychiatry and behavioral sciences at Stanford University School of Medicine, said in the press release. “The second is that the gaps of darkness between the light flashes allow the pigments in the eye that respond to the light to regenerate — that is, go from an inactive form that cannot respond to light to an active form that is able to respond to light.”

Of course, our sensitivity to light can be a bad thing if it's not timed properly; research has shown that staring at electronic devices like your laptop or smartphone before bed impairs your sleep because it tricks your mind into thinking it's day time. But flashing light therapy, when timed at the right moment, could help you make the transition to different time zones.

It may seem disturbing to have a light flashing on your closed eyes while you sleep, but the researchers claim most people can sleep fine with such a light shined throughout the night. And its potential to treat sleep cycle problems could go beyond the jet lag of travelers — the researchers believe flashing light therapy could aid sleep-deprived medical residents or night shift workers like nurses and truck drivers to better manage their circadian rhythms.

Source: Zeitzer J, Najjar R, et al. Journal of Clinical Investigation, 2016.