In space, the urge to masturbate may be lower due to reduced gravity, which affects testosterone levels and blood flow. Erections can be harder to achieve. Additionally, the close proximity of sleeping quarters and the long duration of trips might dampen the desire. Handling liquids in zero gravity is challenging, making the use of lube impractical. Astronauts likely rely on a dry technique involving manual stimulation.
Clean-up presents another challenge. Chris Hadfield demonstrated spill clean-up methods, involving chasing and capturing the spilled substance with a paper-towel-like object before sealing and disposing of it. However, chasing ejaculate (\~23 MPH) across the space station would be nearly impossible. To prevent unwanted stains, a male astronaut would likely cover the end of his penis with a cloth or rag during ejaculation and dispose of it as one would handle any other spill. Alternatively, they might choose to ejaculate into their clothing, such as boxers or shirts, allowing it to dry and remain discreet. However, the presence of hardened stains could become bothersome over time.
But either of these will make a hard stain, which, in the case of a shirt, would be visible. And although clothes usually drift a bit off of your body in space, you probably don’t want to deal with having a hard stain so close to you for a month. Even three days could get annoying, although it does seem to raise the possibility of just masturbating on the third day, right before clothes-changing day. In the case of using a dirty shirt as a dedicated cumrag, he would still need a place to hang the cumrag while he isn’t using it. So my guess is that they use Russian rags like paper towels: get a Russian rag and a plastic bag to contain it afterwards, masturbate without lube, cover the end of the penis with a rag before ejaculation, ejaculate into that, then dispose of the rag with the plastic bag.