Martinez has been out with a groin injury since early in the season, and said that the target is to start on a personalised training course next week.
"The operation went well, and my rehab programme is on schedule," he told the club's official website. "I'm back out on the pitch, getting through running and sprint exercises, and I'll soon have the ball back at my feet.
"I think - and I hope - I should be able to resume the team training programme step-by-step in the course of next week. We're going to increase the training load over the next few days as we slowly but surely get back to 100%, although we're taking it very carefully so we avoid setbacks."
Martinez joined Bayern in 2012 from Athletic Bilbao.