Let M be a compact Riemannian manifold with or without boundary, and let −Δ be its Laplace–Beltrami operator. For any bounded scalar potential q, we denote by λi(q) the ith eigenvalue of the Schrödinger type operator −Δ+q acting on functions with Dirichlet or Neumann boundary conditions in case ∂M≠∅. We investigate critical potentials of the eigenvalues λi and the eigenvalue gaps Gij=λj−λi considered as functionals on the set of bounded potentials having a given mean value on M. We give necessary and sufficient conditions for a potential q to be critical or to be a local minimizer or a local maximizer of these functionals. For instance, we prove that a potential q∈L∞(M) is critical for the functional λ2 if and only if q is smooth, λ2(q)=λ3(q) and there exist second eigenfunctions f1,…,fk of −Δ+q such that ∑jfj2=1. In particular, λ2 (as well as any λi) admits no critical potentials under Dirichlet boundary conditions. Moreover, the functional λ2 never admits locally minimizing potentials.