This link is a companion to the WW2 era editorial cartoons. The boom in superhero comics (ca. 1939) coincided with WW2, and as the US entered the war in 1941, there was a two-fold reaction.
From a pure propaganda viewpoint, Captain America was on the cover of his premiere issue giving Adolf a sock on the jaw. On the other hand, many of the existing superheroes changed into their civilian clothes, enlisted, and fought the Axis powers as regular American heroes.
After the war, these heroes put the Spandex back on, only to run head on into the Wertham era in the 1950s.