It also just so happened that the 1962 elections were coming up, and the GOP looked to make some major gains. Kennedy could have perpetrated the crisis in the summer of 1962, when evidence of Soviet missiles in Cuba first emerged and Senator Kenneth Keating (R-NY) was making speech after speech on this issue. But the president chose to raise the issue in mid-October, and the crisis was resolved nine days before the election.
Many Democrat candidates benefited from the euphoria felt by many Americans who were relieved that thermonuclear war had apparently been averted while the Republicans complained that the election was "Cubanized."
If Kennedy was playing politics with these events, he was even stupider than I thought he was.