Pedro Galvao: “I love what I do. Having games Saturday and Sunday is no problem. You’ve just got to be mentally prepared. ” (Photo courtesy of the Cosmos)

The secret to Cosmos’ defender Pedro Galvao’s ability to play almost two full soccer games within 24 hours at a high level?

Easy.

Keeping fit and the Atlantic Ocean.

Prior to to the Cosmos’ 2-0 away victory over the New York Athletic Club Sunday, Galvao took a dip in the Atlantic Ocean. It wasn’t for the fun of it. It was to help him make a quick recovery from Saturday night’s 5-1 home win over Hartford City FC.

He played 79 minutes on Saturday and went the entire way on Sunday at left back. Several players performed in both games, but no field player logged as many minutes as Galvao did.

“It’s tough, but I don’t mind, to be honest,” he said about the back-to-back matches. “I love what I do. Having games Saturday and Sunday is no problem. You’ve just got to be mentally prepared. Sometimes I say that pain is in your mind and if you get over it, training is good to go over all the pain.”

Galvao, who lives near the water on the South Shore of Long Island, went to a beach for some quick therapy.

“I went to the ocean [Sunday] because it’s very, very cold,” he said. “I was inside the ocean until my lower body just to get cold water with salt.”

He said he planned to repeat teh process on Monday “and then just rest, rest and rest. I will stay with family. That’s the best thing.”

Sunday’s original game plan was to have Galvao play a half at the most. But he felt in pretty decent form in the opening half. It certainly didn’t hurt the 30-year-old defender that he was a constant force on the Cosmos’ attack, overlapping most of the time.

“We have to run a lot,” he said. “I was tired, but I don’t think about it very much. I was supposed to play 30-45 minutes. At halftime, I said to Carlos [Mendes, head coach]: ‘Carlos, I am good to go, so don’t take me out. I’m ready.’ ”

Mendes, who rotated virtually the entire Starting XI from Saturday night’s match — midfielder Junior Burgos was the only other Cosmos player who started both games — kept Galvao in the contest.

“He’s incredible. He’s so physically fit,” Mendes said. “We spoke to him to see how he was feeling, how he felt at halftime, make sure everything was going well. He’s a guy who’s so smart. He’s got a great mentality. He’s fit. He ended up putting in the 90. For me, he was one of the best players on the field tonight.”

The Cosmos’ attack from the back was far from being one-sided. At right back, Kevin Venegas did as much overlapping as Galvao did.

Mendes said he felt Venegas enjoyed an impressive second half.

“He got more involved in the attack,” he said. “When he gets involved in the attack, his service is fantastic. Je puts great balls in and he probably put at least four or five crosses that put them into trouble. I thought the first half was a little quiet, not only him, but the way we were playing. He got more involved in the second half and made a difference for us.”

Venegas said that he has fit in well with the Cosmos’ philosophy of getting every player involved in the attack, including the outside backs.

“Outside back positions are not as developed in this country as it is in other countries,” he said. “Outside backs, you look at the top teams in the world, are crucial in the development of the play. They’re involved getting up the field. They’re also responsible to play defense at the same time. So, I think a lot goes into that position. I think all the outside backs we have, have that in mind to push forward. That’s something the coaching staff works on in training to get us forward and depends on us to cross the ball and also work back.”

It worked to perfection this past weekend.

The Cosmos will play three consecutive matches on the road at the Brooklyn Italians on Saturday, June 8, at Boston City FC on June 15 and then at the Rhode Island Reds FC on June 16.

They return to Mitchel Athletic Complex in Uniondale, N.Y. to start a four-game homestand against the Greater Lowell Rough Diamonds on June 23 at 8 p.m.