when (one) is least expecting it
At the point in time at which one is least prepared or has not been anticipating (something). Things seemed to be going well, and then, when I was least expecting it, my boss said that I was being fired. We will organize our forces and strike the enemy when they are least expecting it.