I had this with my 1st preg, and have got it sometimes when not preg also.

My physio told me it was often caused by dehydration. Are you drinking enough water?