Hold your arm up straight in front of you, at shoulder level, and see how steady your arm is.

Our understanding of how snakes perceive their world is still very limited. Could be she is trying to listen for something (moving head from side to side to see which side is closer to the noise), trying to sense something with pits, smell something, look at something, or it's just plain kinda hard to hold your head and half your body up in a tense, ready to strike position and she's a lil bit wobbly.

I wouldn't worry, what you're describing sounds like a pretty normal snakey behavior.

-Jen