Nature doesn't care if you're busy making history with the U.S. space program. Sometimes, you really have to go.
Normally, this isn't a problem. There was a piece of technical equipment in early space suits called a urine collection device. But Alan Shepard, the first American in space, didn't have one.
Shepard's flight aboard Freedom 7 in 1961 lasted just 15 minutes, so mission planners didn't account for the possibility that he might need a bathroom break. But he was sealed in the suit for hours beforehand. And he was strapped into his chair for a while, waiting for a launch that got delayed several times. Eight hours is a long wait.
According to an account of the launch from author Tom Wolfe, Mission Control told Shepard, "Just do it in the suit!" So he did. Computers in mission control reported several sensors in Shepard's suit shorted out. This was dramatized in the film adaptation of "The Right Stuff" — because of course it was.
Suit designers fixed this problem, but it still took them a few months to figure out a permanent solution. Gus Grissom, the second American in space, wore nested layers of rubber pants.
John Glenn got the first official urine collection device during his flight in February 1962. It's now on display at the National Air and Space Museum.