The American beat early trouble to score a 7-6, 6-1 win over Cavaday, while her possible semi opponent Sharapova recorded an easy 6-1, 6-4 win over Stephanie Foretz of France.
Before opening the defence of her crown, Williams admitted she knew little about her 197th-ranked opponent who almost toppled former champion Martina Hingis of Switzerland in the first round last June.
Serving at 40-0 up on her opening service game, the seventh seed was irritated by an insect buzzing around her ankles, and Cavaday raced through the next five points to break and led 3-1 before Williams restored normal service.
"I was about to serve. I felt something on my leg. I looked down. It was a bee, a big old bumblebee," said Williams, who reeled off the last six games to book her place in round two.
"I didn't want it to sting me... then I ended up losing that service game, so I guess the bumble bee got me off to a bad start," she said.
Compatriot Lindsay Davenport, the 25th seed, who returned to the grasscourt major following a two-year absence, pulled off a 6-3, 5-7 and 6-3 win over Renata Voracova.
Jelena Jankovic, who hopes to join fellow Serbs Ana Ivanovic and Novak Djokovic in the grand slam winner's circle, opened her account with a 6-3, 6-2 win over Ukraine's Olga Savchuk.