Our circadian rhythms are regulated by sunlight. More specifically, the pineal gland in the brain suppresses melatonin when the retina is exposed to natural sunlight. This allows for a huge melatonin surge at night, putting you to sleep and telling the body to perform its nighttime functions. When you aren't exposed to natural light during the day, your pineal brands produce melatonin when they should not be doing so, leading to all sorts of problems.
To make matters worse, even looking at the sun through a window won't work; enough spectrum is blocked that melatonin production continues.
tl;dr; If you want to optimize health and sleep, work outside (in the shade) as often as possible.