An article about the origin of Viking horned helmets has a paragraph about this. It seems that the use of such horns in German and Scandinavian crests became common in the thirteenth century. While there does not seem to be direct evidence of the origin, it had long been believed that a tradition of wearing horns on helmets came first.
Bull- and buffalo-horns are a familiar and much commented upon feature
of thirteenth- and fourteenth-century German and Scandinavian heraldic
crests. There seems to have been an early scholarly consensus about
the existence before the twelfth century of war-helmets bearing actual
bull-horns. In 1643 Ole Worm confirmed: "Most of our nobility wear
horns on their helmets, the insignia of their distinguished families,
now and again picked out in various colours; formerly real horns were
taken from animals." [...] Warnecke's Heraldisches Handbuch
(Frankfurt a.M., 1882), illustrated in 1879 by Emil Doepler the
Younger, proposed that the origin of the helmet crest was to be found
in the real bull-horns and eagle-wings worn in ancient times (p. 18).