It's common in ball pythons that have or are developing a respiratory infection ... since they lack to ability to expel mucus from their lungs via sneezing or coughing like humans do, they will typically sit for long periods with their heads elevated so that the mucus slides down into their lungs via gravity and allows them to breathe easier.
Keep an eye out for secondary symptoms like wheezing, whistling, bubbles, or extra mucus/saliva around the corners of the mouth and if you haven't found a reptile vet in your area, it might be a good idea to start looking just in case ... it's that time of year.
No one can diagnose a problem with your animal over the internet, I'm just describing one possibility ... if you have any serious questions about your animals health or well being, a trip to the vet is the best thing that you can do for your animal.
-adam