The following story is excerpted from TIME’s special edition, The Science of Sleep, which is available at Amazon.
When you want to slim down, the plan probably looks a bit like this: Step one, toss out the junk food; step two, pull out the running shoes; and step three, renew that gym membership (and actually use it). But a growing body of evidence suggests that getting a good night’s sleep should be on—or at least near—the top of the list.
Few experts would disagree with the idea that we’ve become a nation in need of a pick-me-up. We stay up too late, we wake up too early and, increasingly, we’re overweight. While there’s plenty of data showing that poor sleep can lead to weight gain and possibly even obesity, some new research also shows that the opposite may also be true: that getting the right amount of good quality sleep may actually help you shed a few pounds.
“Getting a full night of sleep is one of the most under-appreciated factors contributing to healthy weight maintenance,” says Matthew Walker, a professor of psychology and neuroscience at the University of California, Berkeley, who studies the effect of sleep on weight.
Like all weight-loss strategies, sleep is not a quick fix, but consistently clocking a quality night’s sleep could be the secret sauce for your weight-loss plan. So keep the following lessons in mind when optimizing your sleep schedule for a more favorable number on the scale. Here’s why.
1. It can reduce your cravings for unhealthy food.
It takes a lot of willpower to order a salad over a pizza, and research shows that how much sleep you’ve clocked can make or break your resolve. In a small but intriguing study published in the journal Nature Communications, Walker and his research team put 23 healthy, non-obese men and women through two sleep-related tests. In the first experiment, the men and women got a full eight hours of sleep, and in the second they were sleep-deprived for one night. The following day, they were placed in a brain scanner and asked to rate how desirable certain foods were to them, from a piece of fruit to things like ice cream. After a full night of rest, the people in the study tended to prefer healthier foods. But when they were sleep-deprived, the same men and women not only craved more junk food, but the area of their brains in charge of making rational decisions—like healthy food choices—was inhibited. Overall, the sleep-deprived people wanted foods that contained on average 600 calories more than what they craved when they were well rested.
MORE: Lack of Sleep Dramatically Raises Your Risk For Getting Sick
“We are finding that getting a full night of sufficient sleep actually helps you reboot and refresh the circuits of the human brain, allowing it to make optimal food choices,” says Walker. “These food choices may put you on a path toward weight control, rather than weight gain.”
And it’s not just pulling an all-nighter that can throw off your weight regulation. A 2013 study by University of Colorado researchers showed that losing a few hours of sleep a night for a few nights in a row can result in weight gain.
2. It can help you feel fuller, longer.
Getting a good night’s rest not only helps you fight the urge to reach for a bag of chips, but it also keeps your hunger pangs in check. Take a study of 1,024 volunteers that showed that when people didn’t get enough sleep, their hormone levels became unbalanced. Their levels of the hormone leptin, which is responsible for feeling full, dropped, and the levels of the appetite- inducing hormone ghrelin went up. Researchers think sleep helps our bodies keep those hunger hormones in line, making sure we feel hungry only when we should.
3. It makes you more likely to stick to your diet.
In 2012, Charles Elder, a researcher at the Kaiser Permanente Center for Health Research, recruited 472 obese adults into a weight-loss program that included weekly group meetings and counseling on diet and exercise. Elder and his colleagues measured a variety of factors, including levels of sleep, stress and depression. “At the beginning of the study, the people who told us they were sleeping six to eight hours a night ended up doing better in the weight-loss program than those who were sleeping less than six or more than eight hours,” says Elder. Stress mattered too. People who had low stress and were sleeping more than six but no more than eight hours a night were about twice as likely to have success in the program as people who had higher baseline stress and who were sleeping too much or too little.
MORE: If You Do This Before Bed, Your Sleep Will Seriously Suffer
Elder’s study is not the only one to make the connection. A 2014 study of women ages 25 through 65 who were classified as overweight or obese and participated in a seven-month weight-loss intervention showed that women who had fragmented sleep and woke up five or more times a night lost less weight than the women who had higher-quality sleep.
“The data makes us think that we should be paying attention to sleep patterns when we are offering sleep-management programs,” says Elder.
4. You’re more likely to exercise.
“Losing weight takes a lot of energy, and if you are sleeping too much it’s going to impact your energy level, and sleeping too little can have effects on your ability to focus and concentrate on all the tasks at hand,” Elder says. And though he can’t say for sure, Elder believes that one of the main reasons getting enough sleep is linked to successful weight loss is that it provides you with the drive you need to stick to your goals. Other research has shown that people who are sleepy often say they exercise less, opting instead for sedentary activities like watching TV.
5. Sleep leads to better calorie burn.
While you sleep, you’re likely to burn somewhere between 50 and 100 calories an hour. According to Walker, “When you dream, your brain can be as—if not more—active than when you’re awake.”
Experts are now learning that getting the right amount of sleep encourages a healthy metabolism, and skimping on sleep throws it out of whack. For example, a 2012 study published in the Annals of Internal Medicine showed that when a small group of men and women got only four hours of sleep a night, their bodies became more insulin-resistant, a red flag for obesity and diabetes.
Other research has shown that sleeping in cooler temperatures can stimulate a type of fat called brown fat, which burns more calories and has been shown to improve insulin sensitivity. In a 2014 study, a group of healthy men spent a month sleeping in a 66° room. After just one chilly month, the men had a 42% increase in brown fat and a 10% increase in metabolic fat activity. Sleeping in a cool room may sound like an easy fix, but it’s no cakewalk. Simply turning up the AC and wrapping up in a blanket doesn’t count. The researchers suspect the act of shivering is one of the primary drivers of the effect, so you have to really feel the chill.
No expert suggests that sleeping, without other behavioral modifications, will help you lose weight, but since many weight-loss plans are hard to sustain, there’s no harm in turning your attention to turning in for the night. After all, doing what’s best for your metabolism while you rest may be just as important as what you do when you rise. 
More Must-Reads from TIME
- Donald Trump Is TIME's 2024 Person of the Year
- Why We Chose Trump as Person of the Year
- Is Intermittent Fasting Good or Bad for You?
- The 100 Must-Read Books of 2024
- The 20 Best Christmas TV Episodes
- Column: If Optimism Feels Ridiculous Now, Try Hope
- The Future of Climate Action Is Trade Policy
- Merle Bombardieri Is Helping People Make the Baby Decision
Contact us at letters@time.com