A large amount of evidence has demonstrated the power of exercise to support cognitive function, the effects of which can last for considerable time. An emerging line of scientific evidence indicates that the effects of exercise are longer lasting than previously thought up to the point to affect future generations. The action of exercise on epigenetic regulation of gene expression seem central to building an “epigenetic memory” to influence long-term brain function and behavior. In this review article, we discuss new developments in the epigenetic field connecting exercise with changes in cognitive function, including DNA methylation, histone modifications and microRNAs (miRNAs). The understanding of how exercise promotes long-term cognitive effects is crucial for directing the power of exercise to reduce the burden of neurological and psychiatric disorders.