Most neck pain only lasts a few weeks. There are things you can do yourself to ease it, but see a GP if it doesn't go away.
take paracetamol or ibuprofen – or use ibuprofen gel on your neck
use a low, firm pillow
put heat or cold packs on your neck
try neck exercises
do not wear a neck collar – it's better to keep your neck moving (unless a doctor tells you not to)
do not do anything that could be dangerous because you can't move your neck – for example, driving or cycling
Try either of these:
You can also buy heat or cold packs from a pharmacy.
The most common causes are:
when sleeping, make sure your head is the same height as the rest of your body
have a firm mattress
sit upright – roll your shoulders back gently and bring your neck back
do not keep your neck in the same position for a long time – for example, when sitting at a desk
do not sleep on your front
do not twist your neck when you're in bed