Motor memory is stored mainly in the brain, not the muscles. Practicing a movement strengthens connections among neurons in the motor cortex, cerebellum, and basal ganglia, and repeated practice makes those circuits fire in a more efficient pattern. Over time, synaptic changes such as long-term potentiation help turn a deliberate, effortful action into one that runs almost automatically.
Much of this learning happens during sleep and rest, when the brain replays and consolidates recent practice. Because the skill is held in neural circuits, "muscle memory" is really a brain-level process, and it can be relearned far faster than it was first acquired.