In this case, temporal summation occurs. This basically means, the contraction builds and builds on top
of each other sort of like a piggy-back effect causing an increase in contraction each time.
Once, orgasm is reached, the muscles or neurons are no longer receiving this stimuli. However, there is so much free residual calcium still left in the muscle cells, they are still in a contractile state. Until, this free Calcium is taken back up, your muscle will not relax which can cause cramps.