Humans are wired to be awake during the day and sleep at night, but millions of Americans defy biology to pull the graveyard shift. Hospital employees, firefighters and, increasingly, office workers all punch in for nighttime work. These nocturnal schedules appear to be one driver of the rising rates of obesity and metabolic disorders. Yet exactly how swapped slumber time fuels metabolic disarray has largely mystified sleep researchers.

Daytime shuteye, for one reason or another, simply is not as restful for humans. But is it the massive sleep debt that never gets repaid or disruptions to circadian rhythms that can foster health problems? Whatever the cause, the end result can be a murky cycle of excessive fatigue, hormonal changes that lead to more snacking and, eventually, weight gain and higher rates of metabolic disorders like diabetes. Understanding the root of the problem, however, may one day lead to better therapies to help prevent these disorders.

That’s why one key study from Brigham and Women’s Hospital (BWH), published back in 2012, has continued to nag the researchers who produced it. Their findings, which appeared in Science Translational Medicine, bolstered the relationship between poor sleep and diabetes. For that work, two dozen volunteers agreed to spend more than a month in a sleep lab where they were isolated from visitors and other external signals that would tell them what time of day it was. The volunteers were put on recurring 28-hour day schedules and could sleep about 5.6 hours every 24 hours over the course of a three-week experiment. As a result of this induced scheduling, eventually their meal times went topsy-turvy so breakfast might actually be late in the evening, and their sleep patterns were disrupted.

The wacky schedule also had a surprising effect on the volunteers’ metabolisms. Normally, the human pancreas produces insulin, which helps remove glucose, or sugar, from the bloodstream and shuttles it into cells. During the experiment, however, volunteers’ bodies unexpectedly slashed the amount of insulin they were producing. If continued for a longer period, this would put them at risk for diabetes, which occurs when glucose levels get too high in the bloodstream and the body does not make enough corresponding insulin.

Earlier sleep studies conducted over shorter periods had found that sleep loss appears to impair glucose regulation and metabolism in humans. Blood glucose levels rise after meals, and these studies typically found that they rose more than normal following sleep loss, but the body also produced correspondingly higher insulin levels to address most of that change. In the 2012 experiment, however, the researchers revealed a more dramatic change: After three weeks of chronic circadian and sleep disruption the pancreas stopped producing enough insulin in response to the elevated glucose levels from breakfast.

The finding “kind of amazed us,” says Charles Czeisler, the chief of the division of sleep and circadian disorders at BWH. “In this case, glucose levels went up, but instead of the pancreas responding by redoubling the release of insulin, the pancreas actually began to peter out.” After three weeks on the altered schedule there was a 32 percent decrease in insulin secretion in response to a meal.

Fortunately, the changes the experiment induced were not permanent. The participants returned to their normal insulin-producing levels in the week following the study under the watchful eye of lab technicians and health workers who helped ease them back into normal sleeping patterns. Yet questions lingered about exactly what was driving the drop in insulin production: Was it chronic sleep loss or circadian deregulation?

Last year the BWH researchers began a multiyear experiment that attempts to tease apart their earlier results. Their 30 new study participants, all between 55 and 70 years old, live in the laboratory for a 37-day stint without any contact with the outside world. During that stay each person is assigned to one of three arms of the new study. (They receive $7,550 in compensation for completing the experiment.)

In one arm, participants are put on a 28-hour schedule in which they have designated sleeping and eating times. Another arm of the study has participants on a 24-hour schedule but their sleep is restricted to fewer hours than normal on some nights, even though they are kept in the dark for the same amount of time as if it were night. The final arm of the study is the control group, wherein participants are kept on a typical 24-hour schedule and sleep normally (or as normally as they can while staying in the sleep lab with electrodes attached to their heads and IV tubes dangling from their arms). During waking hours study participants complete mental performance tests and have various bodily liquids drawn to help researchers understand how the altered schedules affect their bodies. In their free time, though, study participants in all three arms can listen to music, read books, knit, play instruments or simply hang out in their rooms. The researchers plan to complete the study in 2018.

Obviously any sleep lab lifestyle is not truly representative of how we live in the real world. For one thing, study participants who may normally sleep with a partner sleep alone. And study subjects do not go outside. Moreover, they are barred from deviating from their assigned schedules, so if someone wakes up during their sleep period they cannot flip on a light and read as they may do at home. Instead they have to lay there in the dark and try to get back to sleep. (Difficulties falling and staying asleep are variables the researchers are recording). Sleeping with an IV in one’s arm—used to periodically draw blood—or walking around with electrodes on one’s head and handing over multiple urine and saliva samples are not part of most peoples’ typical routines either. Still, such experiments are the best way to get the necessary data because researchers can control for many factors in the laboratory environment.

Jeanne Duffy, one of the sleep and circadian rhythms experts who oversees day-to-day operations of the BWH study, has high hopes for how their research findings could one day be translated into better policies. “We hope we can make better recommendations of what shift workers can do. If it’s all a sleep issue, we would advise shift workers to just try to get however many hours of sleep they can, and it doesn’t matter where it’s distributed across the day because as long as they get a certain amount of sleep, it will help prevent development of one of these issues,” she says.

If it’s more of a circadian-rhythm issue, however, the recommendation may be to try to get the same shift for a month instead of rotating them so the body is not continually readjusting to new schedules. “That might be difficult to put into practice but it may at least help guide how shift workers are scheduled to work,” Duffy says.

Shedding light on what happens after chronic sleep deficits may also one day lead to better therapies and insights on how to combat obesity and metabolic disorders. But for now, treatments based on this work are still largely the stuff of dreams.