Someone can correct me on this if I am wrong.
Stargazing can come from three primary things: Trauma, genetics, or Disease (IBD or URI).
Trauma to the brain can cause animals to stargaze and waltz (where they constantly turn in circles in one direction). There is no cure, but I have heard that the symptoms can lessen over time. I had a mouse that waltzed for a short time and other than the running in constant left-hand circles, she was fine.
Genetics basically results in trauma similar to the above, though this defect may be passed on to offspring. The Spider morph, in particular, is known for its Star Gazing. Some breeders have selected for less effected individuals and now some strains of this morph barely Gaze at all.
Finally, IBD. Inclusion Body Disease. This is a virus or retrovirus unique to Boas and Pythons. It is a slow, painful killer in Boas, a swift and merciless killer in Pythons. Here is a link to more information:
Inclusion Body Disease
URI, Upper Respiratory Infections, is your classic pneumonia. Snakes do not have the ability to cough in the way we do (no diaphragm), so what they sometimes do is elevate their body vertically to try to drain the fluid to the bottom of their lungs so they can breath more easily. This is usually accompanied by "drooling" or phlegm around the mouth, wheezing, bubble blowing, sluggishness, and the snake laying some or all of its body on its back.
-----
Lincoln, NE
0.1 Pastel, 1.0 Pastel het Pied, 0.1 Pied, 0.1 Cinn, 1.0 Black Pewter, 1.0 Woma (hidden gene?), 0.1 Yellowbelly
2.0 Normals, 1.0 Thayeri, 0.1 Thayeri X Alterna, 0.1 crazy cat, 1.0 husband