Your first time? Then try to take painkiller when you feel that first cramp. Still, do it even in later ones. I also do a position that involves curling up with your feet and hands touching (look up the fetal position in yoga).
Also drink plenty of water!