I'm 21 weeks pregnant, last night my stomach got so hard and it looked bigger I couldn't sleep and I got period cramps it lasted about 45 min.

Sounds like contract. Ions. If having them and painful u heed to go in. Sometimes a bladder infection can cause it. An occasional contraction not a big deal but make sure your not peeing all the time and call your doctors office. Likely fine but if persistent it may or may not be a problem. No pain now or bleeding I presume. No trauma to your tummy, right?