Spending time in the outdoors may improve your sleep, a small study suggests.

Researchers found that a week of winter camping reset the body’s “clock” to be more in tune with nature’s light-and-dark cycle. The result was longer sleep.

The findings, the study authors said, add to evidence that time in the sun and the dark helps people get to sleep at a decent hour.

Get Breaking News Delivered to Your Inbox

The study also highlights how modern living — so heavy on artificial light — may thwart our sleep.

“It’s clear that modern environments do influence our circadian rhythms,” said Kenneth Wright, the study’s senior researcher.

Circadian rhythms refer to the shifts in the body’s biological processes that happen over 24 hours, partly in response to light and darkness.

But while our ancestors may have gone to bed early and risen with the sun, that’s not true today, said Wright, a professor at the University of Colorado, Boulder. Many people get little outdoor time during the day, then stay up late — eyes trained to artificial light from glowing computer, phone and TV screens.

In a 2013 study, Wright’s team found that a week of summer camping — with no smartphones — reset people’s internal clocks to be in rhythm with nature’s.

Saliva samples showed that levels of the “sleep hormone” melatonin shifted compared with a typical week at home. Melatonin levels started to rise around sunset, and the campers’ “biological night” kicked in about two hours earlier.

Accordingly, the campers turned in much earlier than their usual midnight bedtime at home. They also woke up earlier, closer to sunrise.

For the new study, published Feb. 2 in Current Biology, Wright’s team recruited five hardy volunteers for a week of December camping in the Colorado Rockies. Again, the researchers used saliva samples to detect shifts in campers’ melatonin levels, versus a week at home.

Campers’ biological nights started over 2.5 hours sooner, Wright said, and they went to bed earlier.

There was, however, one difference from the earlier study. Winter campers did not rise earlier. So they ended up getting more than two hours of extra sleep.

The study doesn’t establish a direct cause-and-effect relationship between time outdoors and better sleep. And Wright said temperature may have played a role in the extra morning shut-eye. People may have simply preferred to stay in the warmth of their tents and sleeping bags than face the early morning chill, he noted.

In a second experiment, the researchers had 14 people either spend a weekend at home or camping — this time in the summer. They found that even a weekend outdoors caused people to shift their biological clock.

In contrast, people who stayed at home showed the opposite pattern: On weekends, their biological night started even later than it typically did on a weekday.

Why does all of this matter?

According to Wright, there is evidence that people with “late” internal clocks face some health risks. They have higher rates of obesity, diabetes and depression, and are more likely to suffer daytime fatigue and accidents.

“We don’t completely understand why that is,” Wright said.

But, he added, it is wise to not only get enough hours of sleep, but to make sure you’re sleeping at the “right” times.

A researcher who was not involved in the study agreed.

There is evidence, for example, that exposure to morning light is associated with appetite and weight control, said Dr. Phyllis Zee.

She said the new experiments are important because they demonstrate just how powerful exposure to natural light — and darkness — can be.

“Just two days of summer camping reset people’s clocks,” said Zee, director of the Center for Circadian and Sleep Medicine at Northwestern University in Chicago.

If you’re not the camping type, there is good news. “This study is not about camping,” Wright said.

He encouraged people to get out in the sun when they can each day, then minimize bright artificial light at night. That’s particularly important, Wright said, when it comes to blue/green light like the glow from your phone or computer screen.

In the natural world, Zee explained, blue/green light is most pervasive in the morning. Later in the day, natural light shifts toward a red/orange frequency.

She and Wright said research like this can also inform architecture and lighting design. If people are holed up indoors every day, they should be exposed to natural light — or artificial light that mimics natural light — as much as possible.