Epigenetic changes influence memory formation by regulating the expression of genes involved in neural plasticity and the strengthening of synapses, which are critical processes for learning and memory.