Updated

As if holding the record for the longest spaceflight by a female astronaut wasn't enough, NASA astronaut Sunita Williams is preparing to compete in a triathlon … in space.

Williams, who is stationed aboard the International Space Station, is planning to participate in the 26th annual Nautica Malibu Triathlon in September. But unlike the more than 5,000 athletes who will gather at Zuma Beach in California to swim, bike and run, Williams will compete while orbiting more than 240 miles (386 kilometers) above Earth. She left Earth July 17 for her second long-duration stay in the orbiting lab.

Williams will participate in the Nautica Malibu Triathlon in concert with CNN's chief medical correspondent, Sanjay Gupta, for a CNN special. While Gupta sticks to a more Earthbound experience of swimming in the Pacific Ocean, bicycling and racing through the streets of Malibu, Williams will run, pedal, and engage in a series of bench presses that will serve as the microgravity equivalent of swimming.

As part of her triathlon training, Williams participated from space in the Aug. 12 Falmouth Road Race, an annual seven-mile race from Woods Hole in the town of Falmouth, Mass. [Video: Astronaut to Run Triathlon in Space]

Now she has roughly a month to prepare for the triathlon, which requires competitors to swim half a mile  in the ocean, bike 18 miles and run four miles.

Astronauts on long-duration missions at the orbiting outpost exercise roughly two hours each day to combat loss of bone and muscle density. The space station is equipped with a specially designed stationary bike, treadmill (complete with harnesses to keep participants from floating away) and a machine called the Advanced Resistive Exercise Device, or ARED, which acts as a weightlifting machine.

In recent interviews with CNN and WCIA radio in Illinois, Williams described the progress of her training in space, and how her body is adjusting to exercise in the microgravity environment.

"Microgravity is nice to your body," Williams told WCIA. "You can float around, it feels good, but when you simulate gravity — when you're on either the treadmill or the ARED — it sort of hurts. So it's been a bit of an adjustment to get into the exercise."

During her first two weeks in space, Williams spent time familiarizing herself with the machines, which are either new or have been upgraded since she was last at the space station in 2007.

"The first two weeks we've sort of used as a just-get-used-to-the-equipment, get used to the protocols that we're doing," Williams said at the time. "So I think we're at that point that we're finally adapted and ready to start building on it. So, just watch out, because now I'm ready to really start preparing for the triathlon."

Williams told CNN that watching the 2012 Summer Olympic Games, which concluded this past weekend in London, helped provide motivation.

During the interview, Williams demonstrated how to use the space station's bike, which has pedals but no seat. A nearby computer controls the resistance and speed of the bike, and also logs the astronauts' heart rates as they ride.

"This is how I'm going to simulate the bike ride," Williams explained. "For the hills, I can increase my resistance to match the route that you're going to take, because I would assume that Malibu is not flat like Houston, right?"

For the swimming portion of the triathlon, Williams worked with experts in Houston to design a different exercise that she will be able to complete in orbit, said Kelly Humphries, a NASA spokesman at the Johnson Space Center in Houston.

The exercise was created by Mark Guilliams, who works as part of NASA's astronaut strength, conditioning and rehabilitation group. It requires Williams to perform a type of modified bench press. That will serve as her swimming portion of the race, Humphries told SPACE.com.

Williams will use the station's bike to pedal 18 miles and then will strap herself to the treadmill to complete the final four miles of running.

This is not the first time Williams has competed in orbit in a major athletic event. In 2007 Williams ran the Boston Marathon from the International Space Station, finishing with an official time of four hours, 23 minutes and 10 seconds.

There are currently six people living and working aboard the space station. In September Williams will assume command of the station's Expedition 33 crew, becoming only the second woman to lead the orbiting outpost.

Follow Denise Chow on Twitter @denisechow or SPACE.com @Spacedotcom. We're also on Facebook and Google+.