My chiropractor always recommends stretching hydration and if necessary magnesium for most back and neck muscle pain
Combination of trigger point massage, neck isometrics, neck stretches and cold compress should work well. Trigger point massage: Probe along the back of your scalp including behind your ears, the muscles of your neck up to the collar bone and shoulders, and upper part of your back. Massage any sore spots you find. Neck isometrics: Bend your neck left while lightly resisting the motion with your left palm. Hold 5 seconds. Do the same for the right side. Repeat 10 times. Then repeat for the front and back. Neck stretches: Gently pull your neck left while dropping your right shoulder. Hold 5 seconds. Do the same for the right. Repeat 10 times. Cold compress: All this massage and exercise will cause some inflammation of the muscles. Apply a cold compress for a few minutes to relieve the strain. The easiest way is probably to soak and wring a towel, then leave it in your fridge before you start your massage and exercises. Source: personal research and experience, advice from a physiotherapist friend, and consultation with various chiropractors and osteopaths.
Unfortunately, I've never been able to recover the full range of motion within a day. The only advice that can be given is the massage, maybe a hot press on the affected area, and pain pills/sleeping pills for the night if the pain keeps you awake. I.e. It'll get better in 1 - 2 days and there are treatments you can use to quicken the process, but most likely you'll need to suffer for a day.
Try wearing a neck brace. If it doesn’t improve within a few days, consider changing your pillow. It could be you slept wrong, or it could be that your pillow’s life of supporting your head has expired and you need a better pillow.
Oh, definitely magnesium over pain pills! (Ab)use your youth while you still got it since often taking of pain pills leads to eventually popping pills.
I had this before probably wasn’t as bad as yours . But I tried a better sleeping position and it just started getting better . Massaging didn’t really help me it felt nice but really didn’t do anything to help my neck .
Rub your neck muscles start from the base of the neck from the collarbone on the front. Keep rubbing them from there move to the side looks for where it hurts the most until you met shoulder muscle on the back. If you located where the muscle strands hurts just rub at it until it untie the knot or decompressed.