Answer
Swimming causes increase in blood pressure, which can activate "fight or flight" response of sympathetic nervous system whereas eating food causes "rest and digest" response by parasympathetic nervous system. The parasympathetic nervous system promotes blood flow to digestive organs but swimming requires muscle to use more oxygen but due to less flow of blood towards muscle, they began to spasm due to lack of oxygen and nutrients. So swimming after eating is not recommended.
Work Step by Step
Same as above.