If you mount the head on a piece of pvc that is inside another piece of pvc, the head can then rotate. Down inside the body you use an elbow of pvc and another short piece of pvc to make a crank or lever. Position the lever so it is pointing in the direction you want the head to turn with the head in the straight position. Put a spring on the lever to lightly hold the head straight. Now all you need is to place something in the way of the lever as it comes up with the head. You may want to make the deflector adjustable so you can play with how far the head turns. The head will need to start turning before the body reaches the fully upright position. If the lever is very short, then the head could turn from straight to nearly 90 degrees in a very short distance. Of course the shorter the lever, the more force the lifting force will need to overcome to turn the head. Again some adjustability here may be helpful.
Oh yeah. My first thought was to use a pulley and cable system. Thus the title. I find you can not go back and edit the title.
Ah, this is an oldie but goodie, Build your own Lift'n'Turn Piston . You could probably use a regular cylinder instead of a pvc one though.There is a how to out there that just put a groove into a pvc pipe and as the prop went up the head turned. It to was in a casket if I recall correctly. It's a regular haunter I'll try to find it