Second seed Mario Bartoli and third seed Dominika Cibulkova, however, did not fare as well with France's Bartoli beaten by Yanina Wickmayer 6-3 6-2, while Romania's Sorana Cirstea beat Slovakia's Cibulkova 6-7 6-2 6-0.
Williams, who won her fifth Wimbledon singles title last week, arrived in Northern California on Monday and had been unable to get a good's night sleep.
She woke up at 1 a.m. (0800 GMT) on Friday and stayed awake for five hours watching the final season of the television show Desperate Housewives.
"I was hoping to fall back asleep but I didn't," Williams said. "I was crying as always. I love that show. I was wide wake as if I was in Europe still."
In her victory over the South African, Williams felt sluggish but she woke up toward the end of the first set.
"I didn't feel great going out, but I expected to stay consistent till I started to feel better and then I started moving well and that really helped a lot," Williams said.
Wickmayer went into her match against Bartoli with an 0-3 record but out hit the world number 10 from inside the baseline to reach her second semi-final of the year.
"I tried not to give her too many angles and really wanted to go for my shots only when I had the chance," the fifth-seeded Belgian said.
"In our other matches, I think she really just beat me at my own game. Today, I think I was playing smarter."
The 22-year-old Cirstea was routed by Cibulkova earlier this season, but stayed mentally strong despite a bizarre first set when she won six out of her nine challenges.
"Toward the end of the set I was challenging everything because I didn't trust anyone anymore," said Cirstea, who served 15 aces.
"I thought someone was playing a joke on me to see how I would react. It was like Candid Camera because there were too many mistakes, I started to laugh because it was just hilarious.
"The chair umpire never ruled and today if we didn't have a challenge system I would be packing my bags."
Cirstea will face American 20-year-old Coco Vandeweghe, who bested Urszula Radwanska 6-4 6-4 and reached her first WTA semi-final.