You dont seem to have any of the worrying symptoms which might follow head trauma
. An over the counter antiinflammatory and analgesic
should take care of your fleeting pain. You can think about visiting a doctor and getting a cervical xray if the pain persists or gets worse.
Probably a muscle relaxant
should help as well.
Hope you get well soon.