His father was in the United States Navy, so the family moved many times during his childhood before settling in Honolulu, Hawaii. There, Mayer graduated from high school in 1961. Mayer published his first book, A Boy, a Dog, and a Frog, at Dial Press in 1967.