This was studied years ago. See
https://en.wikipedia.org/wiki/Sex_in_space for more info, but it involves mostly special suits and what some people would call bondage to keep people from flying away.
That article is a fun read, with many nice tidbits. I love the imagination of Apollo 11 astronaut Michael Collins who wrote:
"Imagine a spacecraft of the future, with a crew of a thousand ladies, off for Alpha Centauri, with 2,000 breasts bobbing beautifully and quivering delightfully in response to every weightless movement ... and I am the commander of the craft, and it is Saturday morning and time for inspection, naturally."
Alas, despite what Lucas told Carrie Fisher there are spa bras (which don't strangle their wearers - a lie to get Carrie Fisher to go bra less in the first Star Wars) that look like sport bras.