Barry Bonds underwent left hip surgery on Wednesday.
Bonds tweeted a smiling photo of himself in a hospital gown, adding: "I appreciate you all for your prayers. Go Giants."
The San Francisco Giants have reached the NL Championship Series for the third time in five years.