I have found by experiment that temperature affects flies, if you reduce the temp the flies appear to sleep, as a kid we used to put flies in the fridge and when they had cooled down they stopped moving, we would then glue the flies legs to a small model of an aeroplane made out of match sticks (two or three on each wing, shave the matches back to reduce weight) put the model in he sun and the flies came back to life and the model would fly. Not sure about the further affects of altitude on flies, would make an interesting question for doctor Karl.