Most likely rodents have gotten inside the plane and the snake has followed their scent in search of a meal.
If a suspected venomous snake emerges in flight, make any necessary movements slow and deliberate.
If as suggested you drop the interior temperature, the snake might decide to snuggle up to a warm human body