In this paper we consider optimal control of stochastic semilinear equations with Lipschitz continuous drift and cylindrical noise. We show existence and uniqueness (up to an additive constant) of solutions to the stationary Hamilton–Jacobi equation associated with the cost functional given by the asymptotic average per unit time cost. As a consequence we find the optimizing controls given in the feedback form. To obtain these results we prove also some new results on the transition semigroups of semilinear diffusion acting in the spaces of continuous function with the weighted sup norms and on the optimal control of semilinear diffusions for the discounted cost functional.