Linear dynamics are virtually always assumed when designing optimal controllers for wave energy converters (WECs), motivated by both their simplicity and computational convenience. Nevertheless, unlike traditional tracking control applications, the assumptions under which the linearization of WEC models is performed are challenged by the energy-maximizing controller itself, which intrinsically enhances device motion to maximize power extraction from incoming ocean waves. In this article, we present a moment-based energy-maximizing control strategy for WECs subject to nonlinear dynamics. We develop a framework under which the objective function (and system variables) can be mapped to a finite-dimensional tractable nonlinear program, which can be efficiently solved using state-of-the-art nonlinear programming solvers. Moreover, we show that the objective function belongs to a class of generalized convex functions when mapped to the moment domain, guaranteeing the existence of a global energy-maximizing solution and giving explicit conditions for when a local solution is, effectively, a global maximizer. The performance of the strategy is demonstrated through a case study, where we consider (state and input-constrained) energy maximization for a state-of-the-art CorPower-like WEC, subject to different hydrodynamic nonlinearities.