Can a muscle spasam in neck and back cause stress and severe strain on eyes specially while sleeping?

Muscle strain. If this has been of short term onset please go to er and rule out meningeal infection if it long term then please do a sleep study it could just be regular muscle strain but eye involvement could suggest migraine.