Why do sauces thicken as they cool? Why do sauces thicken as they cool? This happens for things like puddings, white sauces, jello, and gravy.

I looked around a little and maybe the reason is different for each of those different things. For some of them it makes sense that the fat would become less viscus as it cools and maybe that is the same for the geletin. But that doesn't really make sense for the white sauce because I thought the thing that makes it thick for white sauce is the gluten. Does anyone know a general scientific reason?
As they cool, many proteins go from long, flexible and un-entangled to short, rigid, and entangled.  For all of those, the basic thickening is due to protein structure. The proteins in question are


puddings - albumin (egg) (Note: egg is complicated, and can be made to entangle at many temperatures, e.g. souffles, meringues)
white sauces, gravy - gluten (flour)
jello - gelatin (from a variety of sources, could be either animal or vegetable)


Similar protein processes also explain the various cooking levels of meat (rare, medium rare, medium, etc.), and the various ways of cooking eggs.