I don't know if any of you have gone through this but I recently have been experiencing an onset of horrible neck spasms that include my trapezius, sternocleidomastroid and scalene muscles. It's a horrible experience to have to go through and I'm pretty convinced it's from a pulled tendon/ligament because it has taken me through the Christmas break and refuses to let up even a little bit. I've been using muscular rub, two different kinds of cervical collars, taking cyclobenzaprine as a muscle relaxant and diclofenac to reduce swelling. I've been to the doctor and she has advised me not to massage the area or see a massage therapist because rubbing the strained muscle will only cause it to spasm harder. So seeing as nothing is helping, I decided I would cover the ways to prevent muscle strains from happening, specifically in your neck because they take up to 6 months to get rid of and are extremely debilitating.
People who sleep on their stomachs, including myself, are very prone to this kind of a strain because in order to lay that way you must turn your head an extreme amount, this is also an injury common to those who have been in a car wreck. However, it can just happen on its own, during a workout, afterwards, or maybe during a brisk turn of the head because something caught your attention. Using a pillow that's too flat or thick can cause this type of strain but so can being around an air conditioner or an open window (in my case, I was outside on the rooftop patio on a chilly day after a work out when I felt the pull). If this happens to you, you can expect pain, stiffness, loss of range of motion, feeling like there is a hard bulge in your neck and numbness (because the sprain and spasms can pull on your blood vessels and nerves). My doctor suggested not working out again until the spasm is gone completely because you can end up tearing ligaments. Alternating ice or moist heat is said to make the pain go away, but it really only relieves the outside layers (such as your skin) and the pain will quickly return. Even taking oral medication hasn't proven too successful, aside from making me drowsy and forcing me to fall asleep and forget about the pain. The most practical improvement has been while wearing my neck collar because it supports my head and the muscles in my neck and back don't have to work to hold it up (they do this without you willing them to).
It's important to do a series of neck stretches whether you're sitting at a computer all day hunched over or going to the gym.