It happens because you started off using carbohydrates for energy and then switched to fat. You can safely carry on with your exercise in these circumstances. If the pain is particularly bad, an energy crisis may occur. This leads to muscle break-down, a process called 'rhabdomyolysis'. If this is the case you should see your doctor at once because treatment may be required.
Most people are perfectly well between attacks but a few develop mild, permanent muscle weakness.
There is no proof that a change in diet will help control these conditions although some people have noticed an improvement on a high protein diet and regular aerobic exercise. The symptoms vary from person to person. Some people find they can sprint and weight-train with no ill effects. Others can play half a game of football, only developing symptoms in the second half. The important thing is to find your own limits and stay within them.