The Serbian world number one earned a 6-3 7-5 6-4 win against his German opponent on Centre Court on Tuesday.
"It was my first match on a grass court this season and my first at Wimbledon and I'm satisfied," Djokovic told BBC Sport.
"It was tricky because Florian Mayer is a very good opponent with a good variety of shots. His game is well suited for grass. It took a lot of effort to come through."
Djokovic is bidding to win a second title at SW19 following his maiden triumph in 2011.