Neck pain may occur if a person's neck is twisted or misaligned while they sleep. This may be because their pillow does not support their neck and head appropriately.