There is a difference between star gazing and parascoping. This is a parascope and its normal.
I don't know why they parascope but that is normal. Stargazing is like this
As far as I know this can be a sign of an RI. I would look in the snakes mouth for excess mucus and listen for wheezing and poping. If any of those symptoms come up, do a search for a snake respiratory infection and take the snake to a herp vet.