That is an excellent question and one that is best answered by a primary care doctor
or another doctor who specializes in the treatment of headaches such as a neurologist
. There are several causes for chronic neck pain and muscle spasms and they may be related to a variety of causes depending on your history and physical examination and since that is impossible over the internet, it is best that you are evaluated by a doctor so they can perform these and figure out the cause of your symptoms. In general, the neck issues you are describing could be related to the migraines you are having, or there is a possibility that they are related to the medications they are giving you to treat your headaches. Several studies have shown that using opiods can cause neck pain after usage as this is one of the signs of opiod withdrawal, and this oftentimes improves with further medication taking and this can go on forever as a vicious cycle. You may consider finding a headache
management specialist who can work with you to get you off your medications and figure out the cause of these symptoms and hopefully improve they symptoms you are having as they are best able to treat patients with complex migraines and a history of multiple medications.