It is physiologically impossible for the body to turn muscles into fat. Though nobody really knows how this myth arose. It could be because that many professional athletes gain a lot of weight after they stopped practicing professionally. This make it looks like the muscles simple have converted into fat, but this is not correct. There are actually several factors in play.
Your muscles will decrease if they are not stimulated by exercise. This means that you are losing muscle mass during the periods when you are not exercising.
If you are used to consume to much food because you need the energy for training, but then you must also put it in reverse and eat less food when you cannot exercise. This can be difficult to adapt too, and if you cannot adapt then it results in an energy surplus which will be stored in your body as fat.
This is connected to factor 2, when you stop exercising you will not burn as many calories compared to when you exercised, which is the reason for the energy surplus, if you then eat just a few more calories than you burn, this once again this becomes excess energy and will be stored in your body as fat.
To summarize these, it means that if you stop with exercising, then your muscles mass will decrease and you burn less energy, therefore there is a risk that you consume more calories than you burn. A combination of these 3 factors can cause it to look like that your body is converting your muscles into fat, but physiologically this is not what happens.