It could be either or. I have a lot of neck trouble too, especially right at this moment.
I have had a massage therapist tell me, and chiropractor agreed, that my 3rd and 5th cervical vertebrae are out of whack. This has been a recurring problem for 20-25 years. I've been for PT quite a few times, for neck, shoulder, upper back. It's all tied together. Chiropractors can help but they can also hurt if they are not careful. I used to have the "roll back and forth, then twist" maneuver, and it always helped ... until one day I was just too tense, and the jerk kept saying, Relax! Relax! Well, if I could have relaxed, I would have not needed the help! His "help" put me in PT for 7 weeks!
The chiropractors I've been to since (never went back, needless to say, to the same guy) I will not allow to do that maneuver. Instead, they use a device called an 'activator' that had controlled impact, and it has helped both joints & muscles in my neck.
I also have taken a hint from PT and bought myself a hydrocollator moist heat pack. There is one that can wrap around your neck. You will probably have to order it online, I can't find anyone locally who carries them now. You can either microwave it in water, or heat in a pan of water. It absorbs the water (close to boiling, heat for 15 minutes or so), then carefully (it's hot!) lift out with tongs, or by tabs, wrap in a couple of towels, go lie down or sit in comfortable chair or couch, and soak it up. I used to drift off to sleep...! for 20 minutes
I also take cyclobenzaprine from time to time - brand name Flexeril, it's a muscle relaxer (related to tricyclic antidepressants, but a very small dose), and find it helpful for muscle spasms and sleep. I ended up in the ER one night (before RA diagnosis) with my whole neck feeling like an iron collar - scary!!! They gave me a shot of Toridol and a some tablets of Flexeril and said, follow up with your doctor.
Rheumatologists will prescribe it for spasms and sleep too.
I'm getting headaches too. I think they are generated by the neck spasms.
Ellen