Chances are, you are suffering from a common condition called torticollis, which literally means, “twisted neck” after the Latin terms of “torti” (twisted) and “collis” (neck).
It’s basically a painful muscle spasm, like a “Charlie-horse” but located in the neck muscles.
This can happen for many reasons, and it is common among infants.
Often a person wakes up in the morning with this and the cause is often related to sleeping with a poor quality pillow, an injury the day before or possibly sleeping with the window open or a fan or air conditioner blowing on you.
However, it can also be a symptom that accompanies a "cold," due to lymphatic swelling. I've had patients who were hit with a pugil stick in military training. A car accident can also cause this.
And infants who have torticollis often have it due to a traumatic birth - let's face it, birth is traumatic, even if all goes well.
If it is due to some sort of traumatic injury, then their may be other problems, as well as the muscle spasm.
Usually, torticollis will gradually improve over a 2 week time frame, but why wait that long? Plus, your body can begin to compensate for the spasm and create more tightness in other areas and long-term negative consequences.
It often takes a few days to a week (at the most) if you receive treatment quickly after the onset.