I have been told that one reason the level of dress on airplanes has gone down is because of the TSA restrictions. It's easier to wear pants with elastic or drawstring waist than it is traditional pants with a belt because you have to remove the belt to go through the scanners.
Oh, I bet! In the years immediately after 9/11, I used to wear sandals just so I wouldn't haven't to untie my shoes. This last time I flew, though, I wore a metal-buckled belt and a jean jacket with metal snaps. Whatever...
Certainly understandable, and as airplanes become more cramped, and airports focus on places to spend money rather than relaxing free time, dressing casually and comfortably is entirely appropriate in return. Even more so for longer distances or red-eye flights.
On the other hand, airline crews rarely set any two aircraft at the same temperature, so I avoid wearing shorts. Since there's a great chance feet can get stepped on in close quarters, I always opt for sneakers with socks at a minimum when flying.
Also, one should dress for the position and respect they desire. Wearing pajamas and dressing down someone in their uniform is a little low class, except in the most egregious of airline screw-ups.