Is it real or is it a myth? Anecdotal and personal evidence suggests that muscle memory does exist but decent studies using human subjects and large samples seem relatively thin on the ground. I did found this widely reported study which showed that just as fat cells don't really disappear when we diet, so it seems that the additional nuclei generated by strength training don't completely disappear either:
The study challenges the idea that muscles go back to their starting condition when you stop strength training. "Our findings suggest that there are permanent structural changes in the muscle," says Gundersen. "We don't know if they're really permanent, but they're very long-lasting in animals, at least." The researchers put mice through strength training on their hind legs. Building muscle generates new muscle nuclei, which Gundersen calls the "small factories that will produce new muscle." Then the researchers took the mice off their training regimen. Gundersen observed their nuclei directly with specialized microcameras, and found that although the mice lost muscle mass, they still maintained the muscle nuclei. Those nuclei give the muscle a head start when training resumes.