Congrats! If you were aware that you were dreaming then you have attained lucidity. As for that cramp, as far as the mind is concerned, your body is simply reacting.