Have magnesium rich foods to prevent cramps Eat protein-rich snacks after your workout Doing some stretching exercise can also help in rest and recovery