There are excellent explanations of the physics that determine maximum endurance speed here, here, and here.
I was thinking of aircraft that have to be "on station" without an indicated altitude and then wondering: Is maximum endurance not a function of both density altitude and speed? If so, what are the relevant variables and equations?
(I imagine that maximum L/D is a function of Mach number, so that might conveniently account for the effect of change in air density with altitude. But from the answers on max endurance speed I see that there are already differences between jets and props which, when air density is added, will result in further differences between turbo-props and piston props.)