Wikipedia proved to be an excellent starting point. It says,
According to Terry Gould's The Lifestyle: a look at the erotic rites of swingers, swinging began among American Air Force pilots and their wives during World War II before pilots left for overseas duty. The mortality rate of pilots was so high, as Gould reports, that a close bond arose between pilot families that implied that pilot husbands would care for all the wives as their own – emotionally and sexually – if the husbands were lost. Though the origins of swinging are contested, it is assumed American swinging was practiced in some American military communities in the 1950s. By the time the Korean War ended, swinging had spread from the military to the suburbs. The media dubbed the phenomenon wife-swapping.
I highly distrust the second inline source - no, I'm not going to link to it - as it is quite literally a site for this sort of thing. The third inline citation is for a conservative Christian page on the matter. Gould's book appears to be the best of the three to look at.
I do not have a print copy of The Lifestyle: A Look at the Erotic Rites of Swingers, and only a Slate article, it seems, does not use some slight variation on Wikipedia's phrasing yet also cites Gould.
After this, I saw that Semaphore answered the question on History (using different sources). Semaphore gives one source that supports the idea, but ends with
However, there is very little actual evidence supporting this story, which seems to trace back to journalist Gay Talese's 1981 book, Thy Neighbor's Wife.
One theory is that swinging began among Air Force fighter pilots and their wives during World War II ... Neither theory has been well documented or verified.
- Taormino, Tristan. Opening Up. Cleis Press, 2013.
This got me worried, as I could not confirm Gould's sources. Then I saw this article:
It seems that the original modern American swingers were crew-cut World War II air force pilots and their wives. Like elite warriors everywhere, these “top guns” often developed strong bonds with one another, perhaps because they suffered the highest casualty rate of any branch of the military. According to journalist Terry Gould, “key parties,” like those later dramatized in the 1997 film The Ice Storm, originated on these military bases in the 1940s, where elite pilots and their wives intermingled sexually with one another before the men flew off toward Japanese antiaircraft fire.
Gould, author of The Lifestyle, a cultural history of the swinging movement in the United States, interviewed two researchers who’d written about this Air Force ritual. Joan and Dwight Dixon explained to Gould that these warriors and their wives “shared each other as a kind of tribal bonding ritual, with a tacit understanding that the two thirds of husbands who survived would look after the widows.” The practice continued after the war ended and by the late 1940s, “military installations from Maine to Texas and California to Washington had thriving swing clubs,” writes Gould.
I tried to track down the Dixons. This says that they were sexologists who retroactively studied this in the 60s. I have found some of their other work, but none of it is related to the scenario - or even the time period - discussed.
I think that this may negate Semaphore's concerns, showing that the "theory" was actually around way before Talese's book, and looks to be true. But I don't know this for sure.