You would never run a marathon without having trained for it, right? While getting a vaccine isn’t anywhere close to running a marathon, the concept is similar: Getting your body in shape before you get your shot can make any vaccine, the ones for COVID-19 included, more effective.

Learn what the science says and then start shifting your habits today, including eating more plant-based foods, exercising daily, and getting better sleep, so that you can optimize whichever vaccine you end up getting.

How an unhealthy lifestyle can affect vaccinations

You might think that getting a vaccine simply involves showing up for your appointment and rolling up your sleeve. Your immune system, however, might say otherwise, according to new research.

When doctors and researchers witnessed the rise in general stress, depression, and unhealthy behaviors during the pandemic, they became concerned that even when a vaccine was ready and available, our immune systems would not be up to the task of creating antibodies. “Based on 30 years of research with a wide variety of vaccines and samples, we immediately recognized these as risk factors for a poorer immune response to vaccination,” says Annelise Madison, lead author of a study published in Perspectives on Psychological Science and Ph.D. candidate in clinical psychology at The Ohio State University College of Medicine. She points to a study that showed that even young, healthy medical students who were stressed and anxious took longer to develop protective antibodies in response to the Hepatitis B vaccine than their less stressed, healthier peers. “So we set out to review literature showing that we can take action now, prioritize our mental and physical health, and have more optimal responses to the vaccine.”

The vaccine works better in a healthier host than someone stressed or unhealthy

After reviewing the data, they found that risk factors for a weaker vaccine response are numerous. They include not only chronic stress and depression but also poor sleep, anxiety, excessive alcohol use, smoking, being sedentary, and eating the standard American diet, which is high in saturated fat, sugar, and processed foods and causes inflammation in the body as a result.

When the body has to deal with these risk factors, such as inflammation, neuroendocrine and immune function are affected. The upshot? “The initial inflammatory response and the more delayed T-cell and antibody responses to the vaccines are altered,” Madison says, meaning it does not work as fast or as well. “These risk factors may reduce vaccine efficacy, increase side effect profiles, lengthen the time it takes to develop immunity after vaccination and decrease the duration of immunity.” While the COVID-19 vaccines are too new to have been included in this research, Madison suspects the same would hold true for them.

But that this doesn’t mean you won’t have immunity if you get vaccinated in the absence of a squeaky clean lifestyle. “Fortunately, the Pfizer and Moderna vaccines are highly efficacious, and most people who are vaccinated will develop immunity,” Madison says.

How to “train” your body for vaccination

The good news is that by taking steps to improve your mental and physical health, yuo will help increase the efficacy of any vaccine you get. And being healthier now comes with a bonus during this pandemic: By taking these preventive measures, you can improve your weight, blood sugar, and lower your blood pressure, all of which lowers your risk of developing severe symptoms from COVID-19, according to the Physicians Committee for Responsible Medicine.

So what can you do? For starters, if you are feeling anxious or depressed you can seek professional help and also work on managing stress through daily activities like mindfulness meditation, Madison says. Find something joyful that makes you happy and do it every day.

Prioritize getting better sleep and daily exercise, plus frequent walks or work breaks. And eat nutritious foods, choosing plant-based foods over animal foods, since saturated fat from animal products is known to raise cholesterol and lead to heart problems over time, whereas the antioxidants in fruit, vegetables, and legumes are the building blocks of a robust immune system.

“The Western diet has fueled an epidemic of chronic inflammation and obesity, which can reduce vaccine efficacy,” she says. “Diet also helps shape the gut microbiota, which strongly impacts immune function and vaccine responses.” For instance, dietary fiber intake can boost antibody responses to vaccines, and because fiber is found only in plant foods, it makes sense to eat more– if not only–plants.

Even if you’re getting vaccinated in the next few days or weeks, Madison’s research suggests that modest, short-term changes to switch to a healthy diet and daily exercise can boost vaccine response. For instance, the day before your vaccine, log a workout and get a good night’s sleep. Proof that sleeping better can pay off: The flu vaccine appeared to be more effective in people who had gotten a healthy amount of sleep two nights before receiving their shot, according to this study from the International Journal of Behavioral Medicine.

Bottom line? Doing all of the above healthy immune-boosting strategies won’t only prep your body for better vaccine outcomes, they’ll also make you healthier until you get your shot, and for the long-term.