Reconfigurable Intelligent Surfaces (RISs), comprising large numbers of low-cost and passive metamaterials with tunable reflection properties, have been recently proposed as an enabler for programmable radio propagation environments. However, the role of the channel conditions near the RISs on their optimizability has not been analyzed adequately. In this paper, we present an asymptotic closed-form expression for the mutual information of a multi-antenna transmitter-receiver pair in the presence of multiple RISs, in the large-antenna limit, using the random matrix and replica theories. Under mild assumptions, asymptotic expressions for the eigenvalues and the eigenvectors of the channel covariance matrices are derived. We find that, when the channel close to an RIS is correlated, for instance due to small angle spread, the communication link benefits significantly from the RIS optimization, resulting in gains that are surprisingly higher than the nearly uncorrelated case. Furthermore, when the desired reflection from the RIS departs significantly from geometrical optics, the surface can be optimized to provide robust communication links. Building on the properties of the eigenvectors of the covariance matrices, we are able to find the optimal response of the RISs in closed form, bypassing the need for brute-force optimization.