Pinched nerve in neck

I must have slept wrong and I woke up and If I move my head I get a shooting excruciating pain In my neck. Does anyone know how to treat this?