I sometimes worried they might trigger my dormant sweet tooth, but actually my palate had changed within months of ditching sugary foods. The energy gels were actually kind of gross to me — I viewed them as a sticky, cloying mess that I washed down with hurried gulps of water. I never looked forward to them, yet the energy boost I got from them sustained me over many long miles.

During a training run I generally only drank water at 10- to 20-minute intervals, but during a long race, the fluid breaks increased, and I alternated between drinking water and Gatorade.

Rethinking Carbs to Help Carry Me Through Workouts

I never made more than a half-hearted attempt at carb-loading the night before an endurance race. I always suspected that spaghetti feasts were just an excuse for gluttony, and resolved to stay fueled and hydrated during the race.

Yet sometimes on race day I would get distracted and forget a gel pack or skip a fluid station. That happened during my first marathon in Chicago in 2014. Leg cramps were the reminder that I needed, and I hope that very nice lady who held out a cut piece of banana to me around mile 23 knows what a lifesaver she was! Carbs, potassium, and magnesium came to the rescue to help restore tired muscles.

Managing my intake of fuel and fluids helped me to make it through the far hillier and more challenging New York race the following year, and finally fulfill my dream.

7 Diet and Lifestyle Tips to Keep Blood Sugar Steady When Exercising

If you’re managing prediabetes or diabetes and you’re into endurance sports, like long-distance running, cycling, or triathlons, these sorts of adjustments may be important for you, too. The experts I spoke to explained that because everyone is different, it’s important to talk with your diabetes healthcare team about your nutritional plan before starting to exercise.

Here are a handful of other tips I picked up along the way that apply to both people with prediabetes and those with type 2 diabetes.

1. Don’t Cut Carbohydrates Completely From Your Diet

“Always make sure you consume enough carbohydrates to compensate for the glucose that is burned during physical activity,” says Robert Graham, MD, of Physio Logic in Brooklyn, New York. Monitoring blood glucose levels is also important for people with diabetes. “Diabetes is a disease that affects the way your body utilizes glucose. Therefore, you must be aware of changes in blood glucose before, during, and after exercise.”

2. Keep Diabetes Medication in Mind When Exercising

“Being wary of potential blood sugar fluctuations is especially important if you take certain diabetes medications that may increase the risk for low blood sugar (hypoglycemia), including insulin or diabetes medications that cause insulin secretion,” says Dr. Graham. Examples of the latter type of medication include sulfonylureas, such as Amaryl (glimepiride), and glinides, such as Prandin (repaglinide) and Starlix (nateglinide). The Joslin Diabetes Center recommends avoiding exercise when blood glucose levels are at 250 mg/dl (milligrams per deciliter) or higher if ketones are present.

3. Monitor Blood Sugar Regularly When Working Out

You may be surprised to learn that blood glucose may continue to decrease for 16 to 24 hours after you have finished exercising, depending on the length and intensity level of your workout, Graham says. “Try monitoring your blood glucose after physical activity and before sleep, so that you have a good idea how [a certain] activity affects it.” You may need more carbohydrates than you would normally ingest, to help compensate.

4. Be Sure to Stay Adequately Hydrated

Turns out, this is smart both from an energy level standpoint as well as for blood sugar management: “Dehydration will affect your blood glucose,” cautions Graham. “Always make sure to drink water and stay adequately hydrated before, during, and after any physical activity.” I usually carry a water bottle with a hand strap, but if you prefer to go hands-free, there are belts with bottle holders, water-bottle backpacks, or bottle cages to fit on your bike.

5. Talk to Your Doctor if You’re Trying to Lose Weight

Complicating the balancing act is the fact that many people who have diabetes are actively trying to slim down, notes Carol White, RD, CDE, a dietitian at Banner – University Medical Center Phoenix in Arizona. “If their goal is weight loss, what they don’t want to do is say, ‘Oh, I’m exercising and having low blood sugars all the time, I need to eat more.’ In that case, they may want to talk to their doctor about adjusting their medication so that they can achieve their goals for weight loss with acceptable blood sugar control without adding a lot more carbohydrates.”

6. Make Sure You Fuel up With a Nutritious Snack Before and After Exercise

Even if you’re trying to lose weight, fasting when working out isn’t the way to go. A protein bar that has two times the protein of sugar in grams is a great preworkout option, says Michelle Miller, a clinical nutritionist with Physio Logic. After a workout, she recommends eating a snack or meal with a mix of carbohydrates, protein, and fiber to replenish you and deliver the sugar you need in a controlled fashion. Berries are a good, low glycemic source of carbs; oatmeal is fiber rich; and a handful of nuts can make a great, high-protein snack. As always, monitor your blood sugar if directed by your doctor to do so.

7. Skip the Carb Loading Unless You’re Going to Do it Right

What about that plate of spaghetti? The purpose of carb loading is to increase the amount of glycogen stored in your muscles as fuel to provide sufficient energy to make it through an endurance activity. “True carb loading involves starting days before the endurance event,” explains Miller. Meanwhile, you are probably in your “taper,” a period of little-to-no exercise before your race. “So it gives you less of a chance to process that glucose properly.” The key is whether your blood sugar has been stable throughout your training. If not, carb loading can backfire on you, she says.

Amy Campbell, RDN, CDE, a nutritionist at Good Measures, concurs. If you have diabetes, carb load with care “or you may end up with either too high or too low blood sugar,” she says. To prevent hypoglycemia you may need to aim for having 50 percent of your calories from carbs when carb loading, rather than the usual 60 percent or 70 percent of calories from carbs that people without diabetes would do. “Likewise, if you carb load but inject too much insulin to cover those carbs, you run the risk of hypoglycemia.

“The key is to balance carb intake with an appropriate amount of insulin so that blood sugars stay within a safe range.” If you’re going to do it, Miller suggests loading up on meals with carbs that are also high in fiber, such as old-fashioned or steel-cut oatmeal and oat-based granola with minimal sugar.

How I’m Balancing Nutrition With Working Out These Days

As for me, nowadays I am doing fewer long runs and have set my sights on half-marathons rather than the full 26.2 miles. Marathon running can leave a lot of wear and tear on one’s joints. I’ve decided that I’d like to keep running for many years to come, so unless I have a race coming up, a typical exercise might entail a 45-minute run or a Pilates class that doesn’t require any energy supplements. Three square meals provide all the fuel I need.