I get this ALL the time...from a certain 4-legged furbaby who insists upon stealing my pillow and pushing my head off to a bad angle.
Since this cat is my hubby's "baby," I make my hubby give me a good neck/shoulder rub. I've thought about getting one of the Homedics shiatsu neck massagers, too, since this happens with such great frequency. So much so that I have a really hard time turning my head to the right to look for traffic while running or a few spots on the MUP that come out at a funny angle to the street.
This pain/stiffness can hang around for the better part of a week, FYI.