It could also be a very high- strung, scared little snake. I've seen my snakes do that after I've startled them ( which isn't easy to do for mine, but it does happen!)
They will get that little twitch in their head and neck, but it usually only lasts until they calm down.
Which would explain why it starts up again if you poke at yours!
*However, if it is getting worse, then definitely get the snake checked for other problems!