The exact cause of the spasm is not known ... muscle is located on the back of the neck and top of the shoulder.) The trapezius muscle now may be working more than it is used to.
shoulder and upper back muscles causes these muscles to tear (on a microscopic level). Your body tries to prevent this tearing by forcing these muscles to knot up. This results in muscle spasms.