Long-distance travel can leave people feeling sluggish and somewhat crotchety. But Stanford University scientists reckon they’ve put an end to this unpleasant problem through body clock “hacking.”

Related: What is the best beach in the U.S.?

Researchers, who published their findings in the Journal of Clinical Investigation, proved that the body’s circadian rhythm, which regulates the sleep-wake cycle, can be tricked into thinking that dawn is breaking early through flashes of light. The process of switching to a different time-zone can be made easier by exposing a person to light during their sleep cycle.

“For example, if you were flying eastward tomorrow, we would set up the device to give you light during your sleep tonight,” Jamie Zeitzer, assistant professor of psychiatry and behavioural sciences at Stanford University, told us. “The flashes would occur during the two hours before you wake up and when you wake up, your brain would be in, or nearly in, the new time zone to which you are traveling.”

Related: Foods you definitely shouldn't microwave

He added: “The more rapidly we can adapt to a new time zone, the less sleep loss we will incur, leading to reduced medical problems and increased happiness.”

Now scientists are conducting trials on teens, using beacons similar to those found
on bridges. Earlier experiments showed that not all light sources work: some provided flashes too frequently, like a strobe light, or were not bright enough, like a camera flash from a smart phone.

“Our current study shows that you can get a two hour change after exposure to a one-hour sequence of light flashes, which are separated by 10 seconds,” said Zeitzer. “We hope to optimize this to get even larger changes in circadian timing, which would enable us to adapt to even longer jet travel and, more importantly, more rapidly adapt to shift work.”

He continued: “I am now working with a start-up company, LumosTech, to put this technology into a sleep mask, which is controlled by a smart phone app,” Zeitzer revealed. “You would need to let the app know what your normal sleep schedule is and to where it is that you are traveling, and the mask will do the rest – pre-adapting you to your new time zone while you sleep.”