muscle does not turn to fat. muscle is muscle and fat is fat. with a sedentary lifestyle muscle atrophies and you develop more fat stores thus your body changes. it is not some magic cell transformation.
when you workout and then become sedentary does the muscle that you gained from exercising turn to fat?