DEAR MAYO CLINIC: I am in my early 40s. During the COVID-19 pandemic, I didn’t get as much exercise and I gained some weight. I now feel like I have less energy. I was previously infected with COVID-19. Is it safe to start exercising again in a crowded gym so that I can work out, lose some weight and gain some energy? Should I wear a mask?

ANSWER: Regular physical activity and structured exercise can benefit people of all ages and physical abilities. These benefits include improvements in overall health, fitness and quality of life, as well as a reduction in the risk of chronic conditions such as heart disease, Type 2 diabetes, dementia and certain types of cancer. Regular exercise also can help maintain healthy body weight, improve mood and feelings of energy, reduce anxiety, and promote good sleep.

The Centers for Disease Control and Prevention and the World Health Organization acknowledge that regular physical activity and exercise is not only safe, but also necessary to promote the health benefits described above. The risk of experiencing more severe COVID-19 symptoms is greater among people with conditions such as obesity and high blood pressure — both of which can be beneficially modified by regular physical activity. Furthermore, regular moderate intensity exercise helps boost immune function, which can protect against or reduce disease severity if you were to become reinfected with COVID-19. This may be why major research findings published in Mayo Clinic Proceedings and the British Journal of Sports Medicine suggest that meeting physical activity guidelines and having greater fitness decrease the likelihood of a severe COVID-19 infection.

You may have heard it said that exercise is “aerosol-generating.” During exercise, the amount of air moved in and out of the lungs increases. This means that, like coughs and sneezes, exercise can increase the number of particles released into the surrounding environment. The virus that causes COVID-19 likely spreads in these respiratory particles.

As COVID-19 vaccination rates increase, CDC guidance on the use of masks and social distancing is regularly updated. When considering how to safely take part in physical activity or structured exercise, you are advised to follow current public health guidance.

Exercising outdoors and avoiding large groups of people is preferable, especially if you are not yet fully vaccinated for COVID-19. If you wish to exercise in a community gym, then maintaining appropriate distance between you and others, and wearing a mask, is advisable. If you prefer to exercise indoors, consider doing so in the comfort and safety of your home.

There have been concerns that wearing a mask during exercise may increase breathlessness, require a greater amount of respiratory effort, and may even cause issues related to rebreathing of your own exhaled carbon dioxide. While wearing a mask during exercise may feel uncomfortable, accumulating evidence indicates that doing so has at worst only a negligible effect on how your body responds to exercise. It also has been suggested that exercising while wearing a mask is safe with no negative health implications, even during hard exercise.

If you have not been fully vaccinated, it is still advisable to wear a mask during exercise, especially indoors. But consider using a lighter cloth or surgical mask, and exercising at a lower intensity.

It is important to stress that anyone who wants to increase their physical activity or start exercise training after being infected with COVID-19 should first discuss this with their primary care provider.

A recent report in The BMJ suggested that while there may be certain risks associated with restarting physical activity after hospitalization due to COVID-19, people who experienced mild to moderate COVID-19 symptoms and did not require hospitalization can resume physical activity about one week after symptoms have subsided. It is advised that these people return to activity in a gradual manner, perhaps starting with a week of low-level stretching and muscular strengthening exercise. You can build up to walking with gradual increases in exercise time, while avoiding high-intensity training or prolonged exercise during the initial return to normal activity. Those who were hospitalized should seek medical advice from a health care professional to assess their risk before returning to activity.

You should be realistic about how quickly you can return to your level of activity before COVID-19, considering the possible effects of detraining following an extended period of inactivity. Furthermore, those with lingering COVID-19 symptoms sometimes referred to as post-acute COVID-19 syndrome or “long COVID,” might encounter greater difficulties returning to exercise. Again, such people should seek the advice of their health care provider before returning to their level of activity prior to COVID-19.

Always speak to your primary care provider if you have questions about exercise or symptoms.

For more content like this, sign up for the Pulse newsletter here.