Melatonin production falls if the lights are on
Having the lights on before bedtime could result in a worse night's sleep, according to a study to be published in the Journal of Endocrinology and Metabolism.
The research shows that the body produces less of the sleep hormone melatonin when exposed to light.
Sleep patterns have been linked to some types of cancer, blood pressure and diabetes.
The US researchers also found lower melatonin levels in shift workers.
Lifestyles may have moved on from a day/night rhythm, but it seems the human body has not.
The pineal gland produces melatonin through the night and starts when darkness falls.
Researchers have shown that switching on lights in the home switches off the hormone's production.
In the study, 116 people spent five days in room where the amount of light and sleep was controlled. They were awake for 16 hours and asleep for eight hours each day.
Initially the patients were exposed to 16 hours of room light during their waking hours. They were then moved onto eight hours of room light in the morning and eight hours of dim light in the evening.
The researchers found that electrical light between dusk and bedtime strongly suppressed melatonin levels. With dim light, melatonin was produced for 90 minutes more a day.
Dr Joshua Gooley, lead author from Brigham and Women's Hospital and Harvard Medical School, said: "Our study shows that this exposure to indoor light has a strong suppressive effect on the hormone melatonin.
"This could, in turn, have effects on sleep quality and the body's ability to regulate body temperature, blood pressure and glucose levels."
Keeping the lights on through the night also reduced the amount of melatonin produced.
Dr Gooley said: "Given that chronic light suppression of melatonin has been hypothesised to increase relative risk for some types of cancer and that melatonin receptor genes have been linked to type 2 diabetes, our findings could have important health implications for shift workers."