While we spend a lot of our lives sleeping - a third of it, give or take - it doesn't mean that we're exactly good at getting rest.

A bunch of factors contribute to quality of sleep, from exercise to muscle tension to before-bed routines. And according to a 2014 study, an even more essential part of your day predicts your rest at night - sunlight.

Lead author and University of Illinois architecture professor Mohamed Boubekri tracked the sleep and behaviour of 49 office workers, 22 of whom worked in environments with lots of windows and 27 in windowless spaces.

And in a result that will want you to park your desk next to the nearest window, Boubreki's team found that people who worked in environments where they could be exposed to some sunlight not only got better quality of sleep, but more sleep.

"Workers in workplaces with windows not only had significantly more light exposure during work hours but also slept an average of 46 minutes more per night during the workweek than workers in workplaces without windows," Boubekri and his colleagues wrote.

The takeaway? The study was far too small to draw any firm conclusions, but as Kristin Wong notes at Lifehacker, the results suggest that giving yourself more light during the day is associated with better rest at night.

The finding also squares with our understanding of how internal clocks work. Sunlight suppresses the production of melatonin, the hormone your body releases that makes you feel sleepy. That's why you want exposure to lots of light during the day, but not at night.

Other research has pointed to a similar theme. Psychiatrists with patients who have Seasonal Affective Disorder - where moods tend toward depression as the days get shorter in the fall and winter - recommend taking walks early in the day in order to enable better rest at night. And a 2004 study of newborns found that those exposed to more light during the day slept more soundly at night.

This article was originally published by Business Insider.

More from Business Insider: