This paper presents a solution to the optimal control problem of a three degrees-of-freedom (3DOF) wave energy converter (WEC). The three modes are the heave, pitch, and surge. The dynamic model is characterized by a coupling between the pitch and surge modes, while the heave is decoupled. The heave, however, excites the pitch motion through nonlinear parametric excitation in the pitch mode. This paper uses Fourier series (FS) as basis functions to approximate the states and the control. A simplified model is first used where the parametric excitation term is neglected and a closed-form solution for the optimal control is developed. For the parametrically excited case, a sequential quadratic programming approach is implemented to solve for the optimal control numerically. Numerical results show that the harvested energy from three modes is greater than three times the harvested energy from the heave mode alone. Moreover, the harvested energy using a control that accounts for the parametric excitation is significantly higher than the energy harvested when neglecting this nonlinear parametric excitation term.