Yes, children can wake up with a stiff neck from sleeping in an akward position. First time it happened with one of my children was when my eldest were 3. I panicked and took him to the dr, only to be told he had a stiff neck. I was more relieved than embarressed though. Rather be safe than sorry!
A few months ago, my then 4-year old woke up with all the symptoms of viral meningitis. He wasn't diagnosed as such, but what I read up I'm pretty sure it's what he had. He wasn't ill enough to go to the dr, so I just took him to the clinic and she told me to just keep an eye on him, but otherwise he was fine.
If you're scared of meningitis, you can lay your child on his back, and lift his leg up, bend it by the knee, and try to press his knee onto his chest. If he doesn't cry in pain, accordingly to our pead, then he's probably fine.
If your child has other symptoms like fever, lethargy, rash, vomitting, nausea, feeling clammy, listless, too sleepy, etc. I would take him to a dr/a&e. Otherwise, maybe just rub some arnica oil (if he's not allergic to peanuts) on his shoulders/neck and give him painmeds for a day or 2 and keep a close eye on him. Hope he feel better soon!