A few nights under the stars could put an end your late-night Netflix habit.

Can't sleep? Go camping
Credit: Robert Lang/Getty Images

Whether it's caused by jet lag, stress at work, a Netflix obsession, or just your internal clock, there's nothing fun about struggling to fall asleep. Anyone who's been there knows late nights spent tossing and turning lead to caffeine-dependent mornings, and the cycle can be vicious.

But a new study by researchers at the University of Colorado, Boulder, says you should start saving that latte money and put it towards a much better cure: a weekend camping trip.

The small case study found that nine people who spent a weekend camping in the Rocky Mountains without their beloved electronics–compared to five who stayed home–naturally fell asleep up to 1.8 hours earlier and woke up earlier, too.

Sleep hormone melatonin is released in response to darkness, but all the time we spend glued to our phones and computers, among other bad habits, can throw its timing off. The gadget-free campers enjoyed nearly 10 hours of sleep each night, and even more importantly, researchers found that their melatonin release had shifted after the experiment.

And if you have a jumbo can of bug spray lying around and are willing to spend a little extra time out there, even better results were found in five campers who spent six days in the great outdoors. Their melatonin was released 2.6 hours earlier than before.

Though this study will need to be replicated on a larger scale to develop more credible findings, it suggests that even a few days living without artificial light could reset your circadian rhythm and help you stay on a normal sleep schedule long after you've folded up your tent.

But what if you can't get a camping trip on the calendar anytime soon?

“If our goal is to have people sleeping at reasonable times so they’re not asleep at work and school, there are things we can do in our daily lives,” Kenneth Wright, director of the chronobiology lab at UC Boulder, told The Guardian. “We would recommend getting more natural sunlight, and that could be starting the day with a walk outside, or bringing more light indoors if you can, or sitting by a window. As important, though, is to dim the lights at night.”