What is the temperature of the ambient room and in the tank?
When snakes look up for extended periods of time like that, it usually indicates they have a Respiratory Infection(RI). Looking up allows them to breathe better because it keeps the mucous down out of their air ways since snakes cannot swallow it down like people.
Respiratory infections are a result of being too cold.
I'm not saying it is an RI, but that's a pretty common behavior for one.