I used to do this with coffee, but I found the caffeine was actually shifting my energy window forward, even shortening it. Now I'll do calisthenics and spend a few minutes outside, taking deep breaths, if I need to wakeup before I sit down.
The amount of time varies, depending on what's going on in my life. I may spend more time journaling, note taking, reading, or just staring out the window and chewing on the thought. I have sessions that last fifteen minutes and others that last three hours.