Wimbledon men’s champion Roger Federer is 35. (Tim Ireland/AP)

Walk around Rock Creek Park Tennis Center during the Citi Open tennis tournament this week in Northwest Washington and you’re bound to see something that has become increasingly common in the pro game: players competing at a high level in their 30s.

Professional tennis is growing older, and players such as recent Wimbledon men’s champion Roger Federer, 35, and women’s finalist Venus Williams, 37, have provided the latest examples of how better training methods, fitness routines, diet and rehab exercises can prolong a player’s career. It’s knowledge that can be used not only by top pros but also junior players and weekend warriors.

“We’re seeing players play so long because of the way they’re taking care of their bodies,” said Todd Ellenbecker, vice president of medical services for the Association of Tennis Professionals. “These are fine-tuned athletes who work on their flexibility, endurance and core strength – components that allow them to do what they do.”

This was not the case even a generation ago, when being on the other side of 30 meant bodies breaking down and imminent retirement, much less finding success.

A key to that change has been a higher focus on work in the gym rather than going out and hitting balls for hours on the court.

“This year, I’m doing more physical [work], more prevention for injuries,” said Sara Errani, shown at at the 2014 U.S. Open tennis tournament in New York. (Ray Stubblebine/Reuters)

When Nicolas Mahut, 35, turned pro in 2000, few players traveled with a fitness coach or a physiotherapist focusing specifically on injury prevention and strengthening exercises, he said. Now, many players in the top 100 for both men and women have hired someone to help them in the gym.

“I work more out of the court than in the court,” said Mahut, one of 26 male players 30 or older in the main draw of the Citi Open. “For example, now I don’t stop [going to the gym] for more than three days. . . . Sometimes I can stop for 10 days to two weeks of tennis, but not more than three days of fitness sessions.”

Marc Lucero, who coaches women’s world No. 60 Shelby Rogers, recommends going to the gym for 20 to 30 minutes to warm up before a match or practice session and working on exercises related to back/spine mobility and that activate the gluteus, hips, hip flexors and adductors. Players also often use elastic bands to stretch out their shoulders.

“I think in the past maybe the gym was just for performance,” he said. “Now the gym is so much more than just performance. It’s maintenance, preventative stuff, corrective stuff, just health stuff.”

If a gym is not available, some of the stretches can be done on the court. Ellenbecker, who is also a physical therapist, said that stretches before playing should be dynamic stretches that elevate the body’s tissue temperature, not static stretches. Save those for after the match.

“You want to increase the blood flow,” he said. “Run around the court three to four times while doing arm circles or get on a stationary bike for four to five minutes. . . . You can also jog in place, do butt kicks, standing lunges — then you warm up gradually on the court, playing mini tennis on the service line just to get the body warm.”

Players are also more conscious about what they do after a hard session on the court.

Minutes after winning her first-round match at the Citi Open on Monday, 2012 French Open finalist Sara Errani, 30, headed over to the players’ lounge, where her trainer stretched out her hips and legs.

“This year, I’m doing more physical [work], more prevention for injuries,” said Errani, one of five female players 30 or older in the Citi Open main draw. “Before . . . I didn’t do too much stretching.”

Players are also putting more focus on diet. Lucero said that it’s “important to have balance . . . eating what you know you can perform with.”

“The young guys have dessert, but I think everyone out there is eating pretty healthy, pretty clean,” he added. “One of the reasons, too, is movement is just a premium, especially in the guys, so when you’re lighter it’s easier to move. You don’t want to go too light, because you’d lose power, but if you find that sweet spot where you haven’t lost power, you’re in a good position.”

Former top 10 Andrea Petkovic, who turns 30 in September, partially credits feeling healthier to a late-career change in diet, opting to avoid sugar and red meat while eating fish or leaner meat like chicken. She once had trouble enjoying vegetables, but now she eats them every day, sometimes in a smoothie.

“Ten years ago, I had no idea how important nutrition is,” she said. “I was just eating pizza every day, whatever was easiest, just because I didn’t know better. Now I’ve changed my diet and I’m just more aware of what I eat, where it comes from.”

The next generation’s stars are learning from what has worked in recent years.

“I think it’s the diet and everybody has a [physiotherapist],” said Dominic Thiem, a 23-year-old ranked No. 7 in the world. “Everyone does treatment after every practice, after every match. It’s probably only small things, but if you do the small things every day over 10, 15 years, it’s going to be a big, big difference.”