The comic plays a loveable loser who forms a special bond with a former high school 'mean girl' (Theron) in Young Adult, the latest film from award-winning director Jason Reitman.
In a chat about Young Adult with The AP, Oswalt admitted that stripping down with Theron for a key scene proved to be quite embarrassing.
Oswalt joked: "Why do I have to be in my underwear next to the most physically perfect person on the planet? Why couldn't I have been next to John Goodman or Michael Moore in their underwear? It was a dream that turned into a nightmare."
The actor previously advised teenagers not to stress over the drama of high school because it doesn't represent the reality of the world.
Young Adult is currently on limited release in the US and opens wider on Friday, December 16. The film opens in the UK on February 10.
> Jason Reitman 'wouldn't make Young Adult without Charlize Theron'
> Charlize Theron is the female Jon Hamm, says Patton Oswalt
Watch the Young Adult trailer below: