When is the best moment to attack or accelerate?
When the terrain allows your speed to go from low to fast naturally.
This can be like a gradient shown here in this video that eases off slightly.
The reason of this is mainly that the speed increase you gain from the acceleration keeps increasing and is carried a good distance from the effort.
One mistake people commonly make is they accelerate in a response to the terrain slowing them down. While they gain speed slightly initially, as soon as they come off the gas they slow down. Overall speed and the greater the time at it matters more than in the moment.
So read the terrain and find moments like these to make your move!!!