The world number one has suffered with shingles and illness since the turn of the year and was forced to withdraw from the Miami Open in the middle of March after injuring his elbow.
Murray subsequently missed Great Britain's exit from the Davis Cup against France over the weekend but kept up his promise to play against Federer in 'The Match for Africa 3' at the Hallenstadion on Monday night.
'I can’t wait to play in Britain again' - Raducanu on entry list for Rothesay Classic Birmingham
The 29-year-old lost 6-3 7-6 (7/5) against in-form Federer yet the result was far from the most important thing for Murray, with the ATP clay court season starting at the Monte Carlo Open on Monday.
Speaking to Eurosport, Murray said: "Monte Carlo starts in a week, so I'm hoping, if I keep progressing as I have with the elbow, to play Monte Carlo.
"If not then I just need to stay patient and I'll try the following week. I'm getting there, I just have to go slowly."
Murray was diagnosed with shingles following his shock fourth-round exit from the Australian Open in January but insisted he was fully recovered when he returned to action in Dubai in February.
He won that tournament but then suffered another surprise defeat to Canada's Vasek Pospisil at Indian Wells on March 12 - his last appearance before picking up the elbow knock.
"I enjoyed it," Murray said after his light-hearted clash against Federer. "I haven't played a match for five or six weeks so to come out and play in front of this crowd against Roger, I appreciate him asking me to come and do this.
"I was trying to get it to a third set, I just couldn't quite do it."
Reigning Australian Open champion Federer is set to take a voluntary sabbatical before the French Open begins at the end of May.
Asked what his plans were over the coming weeks, Federer responded: "Not very much.
"I'll be resting most of the time. The body needs a rest, I can feel it.
"Everything is good. I should be back for the French Open, that's the plan."
Kokkinakis sees off Fognini in Geneva Open first round
Alcaraz: I’m not afraid to say I’m ready to win a Grand Slam