The fan does not cool the air. The fan only cools things that are warmer than the air - that is to say, YOU. Fans only move air, and moving air carries heat away faster.
You might feel cool or even cold, but only because you have cooled enough. The room and air won't be cooler because the fan is going all night.
All of that said, I don't know of any fans that have shutoff timers built in but that's no big deal, just get a plugin timer like you would put on a lamp when going on vacation, and use that. They work for fans too.