If you are talking about weight gain, then I don't think that, that has to do with muscle memory. Muscle memory mainly deals with the CNS, which was trained to fire a certain number of fast twich fibres (slow twitch if you ran). Now, say you are off for 4 weeks. Your muscles start to atrophy, but your CNS still has the potential to get back to the strength it was before you quit. Now, when you lift again after 4 weeks, your muscles respond faster and grow faster than at first, because your CNS relearned the motor skills faster than it took the first time.