Introducing the memory muscle concept
When you practice a movement — like typing, playing guitar, or shooting a basketball —
your brain creates and strengthens neural pathways that control that movement.
The motor cortex sends signals to your muscles via motor neurons.
With repetition, the communication between neurons becomes faster and more efficient.
This is a form of procedural memory, a type of long-term memory for skills and habits.
Your brain learns the pattern so it can run it automatically, with less conscious effort.

Muscles themselves also adapt to repeated activity and stimulus. You proable heard that muscle fibers grow (hypertrophy) and become better at generating force. In addition, you increase the number of myonuclei (nuclei in muscle cells) from satellite cells. Myonuclei control the production of proteins needed for the muscle to function

Now , when you stop training you will notice lose muscle mass, but these extra myonuclei we mentioned above often remain — which is why it’s easier to regain strength later when you resume work out.
How long this memory muscle last?
We covered that memory muscle is related to both retain motor skills and the body’s capacity to quickly regain muscle size and strength after a period of inactivity. We all know that certain abilities once learn as for example to ride a bicycle or play the guitar last someway for many years if not lifetime. I couldn´t find a consistency in resources of myonuclei lasting for specific amount of time but taking into account that most of resources point to myonuclei possibly lasting for years and taking into account that training results in stimulus of both motor skills and regain muscle size and strenght capabilities, it would make sense that the regain muscle size capability also last for years. That said, we should take into account that we grow older hence training at 20´s would probably grow muscle more efficiently as in 40´s so even myonuclei are there, our body capabilities would be reduced due to aging matter.