“This was such a drastic and abrupt change to everyone’s daily life that we needed to see what was going on,” said Dr. Flanagan. “We wanted to put some data to the anecdotal behaviors we were seeing.”

From April through early May, about 7,750 people, most of them from the United States but also from countries such as Canada, Australia and Britain, completed the survey. The average age of the respondents was 51, and a majority were women. Based on their body mass indexes, about a third of the people were overweight, a third were obese, and a third were considered normal weight.

The researchers found that most people became more sedentary, which they said was probably related to less daily commuting and more time spent indoors. But even when people did engage in structured exercise, it tended to be at lower intensity levels compared to before the pandemic. Many people also said they had given in to their food cravings: Consumption of sugar sweetened beverages and other sugary snack foods, for example, went up.

That might explain another finding: About 27 percent of people said they had gained weight after the initial lockdowns went into effect. The figure was even higher among people classified as obese: About 33 percent said that they had gained weight, compared to 24.7 percent of people considered normal weight. People who gained weight also had the largest declines in physical activity.

There were some bright spots in the findings. About 17 percent of the study population actually lost weight during the pandemic; perhaps not surprisingly, they tended to be people who increased their physical activity levels and improved their diets. And despite snacking on more junk foods, many people showed an increase in their “healthy eating scores,” a measure of their overall diet quality, which includes things like eating more fruits and fewer fried foods. The researchers said that the overall improvements in diet appeared to be driven by the fact that the lockdowns prompted people to cook, bake and prepare more food at home. Other recent surveys have also shown a sharp rise in home cooking and baking this year, with many people saying they are discovering new ingredients and looking for ways to make healthier foods.

But social isolation can take a toll on mental wellness, and that was evident in the findings. On average, people reported significantly higher anxiety levels. About 20 percent said that their symptoms, such as experiencing dread and not being able to control or stop their worrying, were severe enough to interfere with their daily activities. About 44 percent of people said that their sleep had also worsened during the pandemic. People on average reported going to bed about an hour later than usual and waking up roughly an hour later than usual. Only 10 percent of people said that their sleep had improved since the pandemic began.

The greatest spikes in anxiety occurred among people who are obese. It was unclear why exactly, but one reason may have been concerns about the virus. The survey took place at a time when studies were first beginning to show that excess weight puts people at a much higher risk of being hospitalized with Covid-19. “We don’t have data to back this up, but our hypothesis is there was a lot more anxiety about their own health,” Dr. Flanagan said. “A heightened fear of the virus would most certainly increase their anxiety levels.”