What causes neck pain when yawning?

Extension . It's probably not the yawn but more so the extension of the neck associated with it which may irritate the facet joints.