It was clear from the very start of the game that Bayern would control the tempo with United having their defensive abilities tested to the max.
And they held on for the majority of the game with David de Gea coming to their rescue on a number of occasions.
But Martinez bagged the only goal of the game when he nodded in from a corner.
United have had a mixed bag of results in pre-season, drawing three, losing heavily to Liverpool and beating Real Madrid earlier this week.
Jose Mourinho has also had to contend with a host of issues with injuries to numerous players and others still to return from their World Cup break.
But with just five days until they open the Premier League season against Leicester, Mourinho opted to name the strongest line-up available to him against Bayern.
Marcus Rashford made his return after returning from his holiday and was named in the starting line-up while Alexis Sanchez was given the captains armband.
The German champions also named a strong line-up with Manuel Neuer, Thiago, Arjen Robben, Franck Ribery and Thomas Muller all in action.
And it was the two Bayern wingers in Ribery and Robben who were causing United all sorts of problems early.
But United struggled to create any chances of their own with Neuer merely a bystander during the opening exchanges with David de Gea coming to the rescue for the visitors on a number of occasions.
The second half continued in much the same vein with United continuing with their dogged defensive display.
Bayern finally got their breakthrough on the 59th minute when Martinez rose highest in the box to head home from a corner.
The German giants held on to their one-goal lead with United unable to even register a shot on target before the end of the game.
Mourinho’s attentions will swiftly turn to Friday’s Premier League opener against Leicester and he will be hoping to have a number of first-teams stars back available to him.