Sex is common among eukaryotes, but entails considerable costs. The selective conditions that drive the evolutionary maintenance of sexual reproduction remain an open question. One long-standing explanation is that sex and recombination facilitate adaptation to fluctuating environmental conditions, although the genetic mechanisms that underlie such a benefit have not been empirically observed. In this study, we compare the dynamics and fitness effects of mutations in sexual and asexual diploid populations of the yeast Saccharomyces cerevisiae during adaptation to a fluctuating environment. While we find no detectable difference in the rate of adaptation between sexual and asexual populations, only the former evolve high fitness mutations in parallel, a genetic signature of adaptation. Using genetic reconstructions and fitness assays, we demonstrate that evolved, overdominant mutations can be beneficial in asexual populations, but maintained at lower frequencies in sexual populations due to segregation load. Overall these data show that sex alters the molecular basis of adaptation in diploids, and confers both costs and benefits.