I suggest you to keep a track of your periods so that you can take prophylactic measures in advance. Take ibuprofen for pain and cramps during periods. You can also try warm compresses, warm water bath and warm pad. Avoid unhealthy diet – excess sugar, salt, caffeine and alcohol. Do regular exercise, keep yourself well-hydrated and eat a healthy diet. Read more about the measures to control pain during periods.