Q: Does muscle turn into fat?
A: HELL NO!
Q: Why not?
A: The fundamental science/biology of muscle and fat does not permit this to happen in any human being.
Q: So why do people generally believe muscle turns into fat when a person stops training?
A: They believe what they see with their naked eyes without understanding the deeper science to the matter.
Muscle does not turn into fat when you stop working out. Muscles and fat are distinctly different, and from a scientific perspective they are not capable of interchange into one another, i.e. from fat to muscles when working out and from muscles to fat when you stop working out. This simply defies science!
I guess the only logical explanation of why people believe in this myth is through their observation of gym-goers, particularly those who lift weights. When an overweight guy starts training with weights, he is likely to build muscles and lose fat. Over time, this combination will result in a muscular body and perhaps even chiseled abs. When this is achieved, the general masses will be skewed into believing that fat has morphed into muscles. On the same note, in the event the same guy decides to reduce his workout intensity or quit exercise all together for whatever reason, he won’t be able to maintain his new found muscular body for long. It won't diminish completely and immediately but if he doesn't watch or restrict his diet, over time there is a huge possibility of him regaining the lost body fat and visually lose his muscular body (it will be nicely hidden beneath the gained body fat). Hence, to the naked eyes this is akin to muscles turning back into fat. Once again, let me reiterate that this is not scientifically possible.
If you are going to quit going to the gym for a while, do make changes to your diet (both quantity and quality) in order to control your body fat percentage.