I agree with the other posters about sleeping at LAX and instead trying to find a cheap hotel rate via Priceline.
As far as your layover at IAD, I've heard rave reviews about the Air and Space Museum out near the Dulles airport. According to the website, among the aviation artifacts on display are the Lockheed SR-71 Blackbird, the fastest jet in the world; the Boeing Dash 80, the prototype of the 707; the Boeing B-29 Superfortress Enola Gay; the deHavilland Chipmunk aerobatic airplane; and the Space Shuttle Enterprise.
More info here:
http://www.nasm.si.edu/UdvarHazy/