That’s the concept behind time-restricted feeding, or TRF, a strategy increasingly being studied by researchers as a tool for weight-loss, diabetes prevention and even longevity.

In TRF, you can eat whatever you want and as much as you want—just not whenever you want. Daily food intake should be limited to a 12-hour window, and ideally cut down to eight to 10 hours. But you can pick the hours you want to eat. (Note: This doesn’t mean you should stuff your face with cupcakes. Experts say you should dine as you normally would.)

Despite a lack of dietary restrictions, most people following TRF end up consuming fewer calories and lose weight, according to studies and experts. Preliminary evidence also shows other health benefits of fasting for 12 hours or more, including lower blood pressure and improved glucose levels, and physiological changes linked to slowing the aging process. Researchers believe that when the body kicks into fasting-mode it more efficiently breaks down food and fat, in particular.

Satchidananda Panda, a professor at Salk Institute for Biological Studies in San Diego, first tracked the effects of time-restricted feeding in mice. In 2015, he expanded his studies to include humans, using a free research app he created, called “MyCircadianClock,” to follow 156 people. Dr. Panda found that 50% ate over the course of 15 hours and only 10% restricted meals and snacking to the recommended 12 hours or less.

The findings, published in the journal Cell Metabolism, showed that when eight overweight people who naturally ate for 15-plus hours a day restricted their eating to a 10-hour window for 16 weeks, they lost 4% of their weight. A year later, they reported sticking to the plan, even though they didn’t have to, and had kept the weight off.

“All of them said they slept better, and they felt more energetic throughout the day,” said Dr. Panda. “They were actually feeling less hungry.”

TRF studies of mice—which provide the bulk of research on the strategy—have found that the body, when fasting for half a day or more, has more time to produce the components for cellular repair, break down toxins and coloring agents in food, and repair damaged DNA in the skin and stomach lining, according to Dr. Panda. There is also some evidence that TRF may reduce the risk of breast cancer.

Most of the repair processes peak around 12 hours after fasting starts, said Dr. Panda.

Julie Shatzel, a family medicine doctor at Mercy Medical Group in Folsom, Calif., said she became a proponent of TRF after coming across Dr. Panda’s study in mice from 2012. She started recommending that her overweight patients restrict their eating to 11 to 12 hours a day. Since then, she’s recommended TRF for patients who need to lower their blood pressure or blood glucose levels.

“Many patients have gone off of blood-pressure medications,” she said. “In some cases, I’ve seen the reversal of prediabetes.”

Dr. Shatzel is now running a weight-loss study with the Salk Institute, tracking patients through Dr. Panda’s app for four months.

Vivian Rootness is among them. For the 66-year-old El Dorado, Calif., resident, dinner parties now start at 4 p.m.

“I’ve just told all my close friends that I have to eat before seven o’clock and they’ve accommodated,” said Ms. Rootness, a hair stylist, artist and biodynamic gardener who had tried countless other diets.

Since restricting eating to 10 to 12 hours a day about five months ago, she has lost around 6 pounds.

Her typical schedule begins with coffee at around 7 a.m. and always ends before 7 p.m. While she tends to eat a healthy diet, Ms. Rootness said she has indulged in dessert more often since starting TRF—and still lost weight.

“I don’t have to count calories or think about what I’m eating now,” she said. “It’s also easier because you’re not depriving yourself of things.... This doesn’t feel like a diet to me.”

Preliminary findings from one study show that what time participants start eating may be irrelevant, and that health benefits may be independent of weight loss.

Leonie Heilbronn, an associate professor at the University of Adelaide in Australia, is studying the effects of TRF in 16 overweight men at risk of developing type-2 diabetes. The men followed two schedules, eating from 8 a.m. to 5 p.m., or from noon until 9 p.m. for one week and then, after a two-week break, eating on the other schedule for another week.

“Both improved their glycemia responses,” Dr. Heilbronn said, referring to the effect food has on blood sugar levels. While the men lost weight, she said, it wasn’t enough to account for the improved glucose levels. “There’s something else going on that’s not just driven by weight change,” she said.

Courtney Peterson, an assistant professor in nutrition sciences at the University of Alabama, Birmingham, found similar results in a pilot study of eight prediabetic men.

Participants ate six hours a day for five weeks and then ate the exact same foods over 12 hours for five weeks. Dr. Peterson said researchers found no difference in the men’s blood-sugar levels, but their insulin sensitivity, or the body’s ability to process sugar, and blood pressure both improved. The study is under review for publication.

Dr. Panda, meanwhile, is working on a new, larger clinical TRF trial of 150 firefighters. Funded by the U.S. Department of Homeland Security, the study is a collaboration with Pam Taub, a cardiologist and associate professor of medicine at the University of California San Diego Health System. Dr. Taub is also conducting a separate study in which UCSD patients with metabolic syndrome restrict eating to 10 hours a day. Preliminary data show weight loss and improved fasting glucose levels.

Konstantin Shevchenko, one of the participants, said he has lost 30 pounds and seen his blood pressure and glucose levels improve since starting TRF in late August.

The 48-year-old animal technical at UCSD now eats between 9 a.m. and 7 p.m., whereas previously he ate as late as 10 p.m. “When you eat by schedule, automatically I started to eat a little bit less,” said Mr. Shevchenko.

At the University of Illinois Chicago, associate professor of nutrition Krista Varady tested a strict eight-hour diet among 50 obese people in a 12-week study.

Participants, who ate between 10 a.m. and 6 p.m., consumed about 300 fewer calories a day and lost on average 7 to 8 pounds, she said. all of the weight loss was due to a decrease in fat mass, not muscle mass, said Dr. Varady. The study is under review for publication.

“I think the real power of TRF is the simplicity of it,” she said.

HOW TO EAT IN UNDER 12 HOURS

Vivian Rootness started following a regular TRF schedule about five months ago, eating during a 10- to 12-hour window each day and occasionally restricting herself to eight hours a day. Here’s a sample schedule of her routine: