You want to apply it so that it's on your body for at least 8-12 hours. I liked using it before my workouts because they were that much better. And when you sweat, your pores open up so you actually end up absorbing more of it.
The timing of application is going to be different for everyone. If you put it on too late at night, it can be detrimental to your sleep.