The US team discovered that volunteers who were roused whenever they were about to fall into the deepest sleep developed insulin resistance.
This inability of the body to recognise normal insulin signals leads to high blood sugar levels, weight gain and, eventually, even type 2 diabetes.
The study appears in the Proceedings of the National Academy of Sciences.
Previous studies have shown an association with diabetes and a lack of sleep.
It is also already known that the deepest sleep, known as slow-wave sleep, is associated with changes that affect metabolism.
To test the impact of sleep quality on blood glucose control, nine healthy men and women were first monitored for two consecutive nights to see what their normal sleep patterns were.
Then on the following three nights, the research team woke them with a loud noise when they drifted into deep sleep - characterised by long slow-moving delta waves in the brain.
The amount of overall sleep they had was unchanged.
After injecting the volunteers with glucose and measuring their daytime blood sugar levels and insulin response, the researchers found that eight of them had become less sensitive to insulin.
Lead researcher Dr Ersa Tasali, of the University of Chicago, said there was an alarming rise in the prevalence of type 2 diabetes associated with an ageing population and increased obesity and it was important to understand the factors that promote its development.
Dr Tasali added that chronic shallow sleep and diabetes are typical factors associated with ageing and more research was needed to find out if age-related changes in sleep quality contribute to such metabolic changes.