Disruption to the body's internal clock may put people at increased risk of mood disorders, scientists say.
A clock ticks in nearly every cell of the body. And they change how the tissues work in a daily rhythm.
A Lancet Psychiatry study of 91,000 people found a disrupted body clock was linked with depression, bipolar disorder and other problems.
The Glasgow researchers said it was a warning to societies becoming less in tune with these natural rhythms.
People in the study wore activity monitors for a week to see how disrupted their clocks were.
Those who were highly active at night or inactive during the day were classed as being disrupted.
And they were between 6% and 10% more likely to have been diagnosed with a mood disorder than people who had a more typical – active in the day, inactive at night – pattern.
Prof Daniel Smith, a psychiatrist and one of the University of Glasgow researchers, told the BBC: "These are not huge differences.
"But what is striking is it is pretty robust across lots of interesting outcomes."
The study found higher rates of major depression, bipolar disorder, more loneliness, lower happiness, worse reaction times and more mood instability in people with body-clock disruption.
However, the study cannot tell if the disruption is causing the mental illness or is just a symptom of it. That will take further work.
The body clock certainly exerts a powerful effect throughout the body.
Mood, hormone levels, body temperature and metabolism all fluctuate in a daily rhythm.
Even the risk of a heart attack soars every morning as the body gets the engine running to start a new day.
Prof Smith said: "The study tells us the body clock is really important for mood disorders and should be given greater priority in research and in way we organise societies.
"It wouldn't be too controversial to say we need to reorganise the way we learn and work to be in tune with our natural rhythms."
The study used data from the UK's Biobank research project. However, many of the participants were quite old.
Dr Aiden Doherty, from the University of Oxford, said: "The study population is not ideal to examine the causes of mental health, given that 75% of disorders start before the age of 24 years."
But he added the study showed the way for a similar research in "adolescents and younger adults to help transform our understanding of the causes and consequences, prevention, and treatment of mental health disorders".