Mayer, the son of a farmer, was born on 19 August 1917 in Konstanz at the Bodensee. Konstanz at the time was in the Grand Duchy of Baden of the German Empire. Mayer grew up on his parents' farm named "Hauserhof" and spent his spare time at the glider airfield at the Bellenberg near Engen. He went to school at the "Langemarck-Realgymnasium"—a secondary school built on the mid-level "Realschule" to achieve the "Abitur" (university entry qualification)—in Singen. Today, the "Langemarck-Realgymnasium", which had been named after the location of the World War I Battle of Langemarck, is the Hegau-Gymnasium.