Adaptation and survival in fluctuating environments is an evolutionary challenge faced by organisms. Epigenetic switches (bistable, molecular systems built from self-reinforcing feedback loops) have been suggested as a mechanism of bet-hedging and adaptation to fluctuating environments. These epigenetic systems are capable of spontaneously switching between phenotypes in the absence of DNA mutation and these phenotypes are stably inherited through multiple cell generations. The extent to which epigenetic switches outcompete adaptation through genetic mutation in fluctuating environments remains unexplored. To better understand the conditions that select for epigenetic switching, we used computer simulation to evolve a mechanistic model of a self-activating genetic circuit, which can adapt genetically and exhibit epigenetic switching. We evolved this model in a fluctuating environment under different selection pressures, mutation step-sizes, population sizes, and fluctuation frequencies. There was a trade-off between minimizing the adaptation time after each environmental transition and increasing the robustness of the phenotype during the constant environment between transitions. We show that surviving lineages evolved bistable, epigenetic switching to adapt quickly in fast fluctuating environments, whereas genetic adaptation was favored in slowly fluctuating environments. For some evolutionary conditions, a strategy emerged where the population adapted genetically between two bistable genotypes.