Mayer was part of the Hungarian team which won the gold medal in the 1956 tournament. He played four matches and scored one goal.
Four years later he was a member of the Hungarian team which won the bronze medal in the 1960 Olympic tournament. He played three matches and scored one goal.
At the 1964 Games he won his second gold medal with the Hungarian team. He played five matches.
In 1968 he won again a bronze medal when the Hungarian team finished third in the Olympic tournament. He played all eight matches.