A few years ago, I linked to a NY Times article about coffee. Here is an amazing and very thorough write-up with embedded videos on coffee and how it affects our body. In short:
Coffee can increase your ability to work and study, and therefore can improve that aspect of intelligence. It’s important, however, to remember the negative effects of caffeine and make sure that it’s drunk in moderation.
Working late into the night with a cup of coffee might seem like a great idea at the time, but in reality it might be best to have a sleep or a quick nap. That way you will wake up refreshed and ready to tackle any task.