"A big shout out to our astronaut strength and conditioning folks, who were really interested in this and who got this whole workout together," Ms Williams said, thanking the NASA Exercise Lab staff and neurosurgeon Sanjay Gupta, CNN's medical correspondent who trained with Williams before her launch and completed the race in Malibu.
"Thanks everybody for your support and ideas about health and fitness and how important it is for humans and getting us back into long-duration spaceflight. I'm happy to be done. It wasn't easy, and I'm sure everybody in California's very happy to be done too," she said from the International Space Station on Sunday after she crossed the orbital finish line.
Ms Williams, who is the US commander of the Expedition 33 crew aboard the space station orbiting earth about 240 miles (386 km) overhead, used exercise equipment that included a stationary bike, treadmill and strength-training machine specially formulated for weightlessness to simulate the triathlon experience in space.
After "swimming" half a mile, biking 18 miles, and running 4 miles, Williams finished with a time of one hour, 48 minutes and 33 seconds, she reported.
The space station has its own treadmill and stationary bike, which use harnesses and straps in place of gravity to keep astronauts from floating away.
To simulate the swimming portion of the race, Williams used the Advanced Resistive Exercise Device (ARED) to do weightlifting and resistance exercises that approximate swimming in micro-gravity.
Meanwhile congratulating Ms Sunita, NASA's flight director in Mission Control termed it "critically important" to understand human physiology and ways to keep oneself physically fit and strong in the orbit.
Exercise is mandatory for all astronauts, because without it spaceflyers' muscles and bones would deteriorate in weightlessness.