Cramps after sex?

Last night my boyfriend and I had sex. I woke up with really painful cramps. Why?