Evolutionary biologists have identified several factors that could explain the widespread phenomena of sex and recombination. One hypothesis is that host-parasite interactions favor sex and recombination because they favor the production of rare genotypes. A problem with many of the early models of this so-called Red Queen hypothesis is that several factors are acting together: directional selection, fluctuating epistasis, and drift. It is thus difficult to identify what exactly is selecting for sex in these models. Is one factor more important than the others or is it the synergistic action of these different factors that really matters? Here we focus on the analysis of a simple model with a single mechanism that might select for sex: fluctuating epistasis. We first analyze the evolution of sex and recombination when the temporal fluctuations are driven by the abiotic environment. We then analyze the evolution of sex and recombination in a two-species coevolutionary model, where directional selection is absent (allele frequencies remain fixed) and temporal variation in epistasis is induced by coevolution with the antagonist species. In both cases we contrast situations with weak and strong selection and derive the evolutionarily stable (ES) recombination rate. The ES recombination rate is most sensitive to the period of the cycles, which in turn depends on the strength of epistasis. In particular, more virulent parasites cause more rapid cycles and consequently increase the ES recombination rate of the host. Although the ES strategy is maximized at an intermediate period, some recombination is favored even when fluctuations are very slow. By contrast, the amplitude of the cycles has no effect on the ES level of sex and recombination, unless sex and recombination are costly, in which case higher-amplitude cycles allow the evolution of higher rates of sex and recombination. In the coevolutionary model, the amount of recombination in the interacting species also has a large effect on the ES, with evolution favoring higher rates of sex and recombination than in the interacting species. In general, the ES recombination rate is less than or equal to the recombination rate that would maximize mean fitness. We also discuss the effect of migration when sex and recombination evolve in a metapopulation. We find that intermediate parasite migration rates maximize the degree of local adaptation of the parasite and lead to a higher ES recombination rate in the host.