During pregnancy, leg cramps while sleeping are not uncommon, and are most probably caused due to the increased stress and pressure on the muscles, from the weight gain, and also due to increased or changed nutritional needs.