Stochastic optimization of nonlinear energy sinks