Hitting the gym improved John Krasinski‘s performance in the bedroom.

“Totally selfishly, [sex] is so much better for me being jacked because you feel so much more confident and you see yourself as this much more sexual person, which is really fun,” the actor revealed in the September issue of Elle.

Krasinski, 36, trained for four months in order to play a Navy SEAL in “13 Hours: The Secret Soldiers of Benghazi.” Krasinski also shared that wife Emily Blunt, 33, is pleased with his buff physique.

“The truth is, she really is that person who would like me anyway. But I don’t think she’s going to kick the eight-pack abs out of bed,” he said.

Though Krasinski has slimmed down a bit since “13 Hours,” he told Page Six that staying in shape remains a priority.

“I’m not as big as I was in ’13 Hours,’ because … I would scare my children,” the star of Amazon’s new Jack Ryan series joked. “But I’ve stayed working out [because] Chris Pratt [said that] once he got there, he never wanted to go back, and I totally understand … Why would you give it all up once you did that?”

This article originally appeared in the New York Post's Page Six.