How do you get rid of neck cramps?

A Pain in the Neck. Stretching, stretching and more stretching. Regular stretching is essential to help relax and condition the muscles of the neck since they are under constant tension, especially if you sleep in a bad position. Ensure proper support in the cervical curvature with a properly positioned pillow or support while sleeping. Heat, massage and trigger point injections may also help in severe cases.
Difficult to say. Hard to know what you mean by neck cramps. You could have an electrolyte imbalance due to medications, dehydration, or illness, but it could be spasms due to many other factors. Cramping in the neck, in my opinion, is not a frequent ocurrence and would lead me to recommending you be seen and evaluatied. Wry neck or torticollis or a "crick" in the neck is common and treated conservatively.