We are made of pretty much the same stuff as the stars, so it’s no surprise the moon can make us mad and a lack of sun can make us sad.

More and more, researchers are understanding the affect of the sun on our physical, emotional and mental health.

It’s the best and most natural form of vitamin D and, if we get too little of it, we are at risk of seasonal affective disorder (SAD). But, a new study reveals that sunshine matters more than we thought and even those of us who don’t get SAD, suffer when we don’t get our time in the sun.

The research, published in the Journal of Affective Disorders, came about by accident, following a chance conversation between Mark Beecher, clinical professor and licensed psychologist at Brigham Young University (BYU) and Lawrence Rees, a physics professor at BYU.

“Mark and I have been friends and neighbours for years, and we often take the bus together,” said Rees. “And of course you often talk about mundane things, like how are classes going? How has the semester been? How ’bout this weather? So one day it was kind of stormy, and I asked Mark if he sees more clients on these days. He said he’s not sure, it’s kind of an open question. It’s hard to get accurate data.”

They decided to use their access to the data of 16,452 adults to find out.

They looked at various different weather conditions over the course of six years and compared them with therapy distress measures.

“Increases in sun time were associated with decreased mental health distress,” Rees and Beecher found. Similarly: “Increased mental health distress was found during periods of reduced sun time hours.”

Interestingly, while conditions like pollution also impacted people, time in the sun seemed to mediate the effect.

It’s not just our mental health the sunshine affects, but our sleep.

Nam Baldwin is the performance coach of various elite athletes including Mick Fanning, Stephanie Gilmore and the New Zealand Warriors.

His advice for the best way to wake up and set your hormones for the day?

“Aim to get 10 to 15 minutes of direct sunlight or some form of exposure to natural light every morning,” he said. “This will assist in maintaining healthy melatonin production and a balanced body clock for sleep/wake cycles.”

Sunlight holds distinct advantages over artificial light, says Alex Korb, a neuroscientist at the University of California and author of The Upward Spiral: Using Neuroscience to Reverse the Course of Depression, One Small Change at a Time.

“It has ultraviolet (UV) light, it is much brighter than standard man-made light, and occurs at the appropriate time,” Korb explains.

Via the UV we absorb through our skin that causes serotonin-producing vitamin D as well as the intensity of light through our eyes, which also produces serotonin (the so-called happiness hormone), the light lifts our mood.

So sunshine warms us up inside and out and it also helps us wind down – but how much do we need?

“When the UV index is 3 or above (such as during summer), most people maintain adequate vitamin D levels just by spending a few minutes outdoors on most days of the week,” advises the Cancer Council.

“In late autumn and winter in some southern parts of Australia, when the UV index falls below 3, spend time outdoors in the middle of the day with some skin uncovered. Being physically active (gardening or going for a brisk walk) also helps boost vitamin D levels.”