This paper proposes a technique for optimizing the power generated from stationary stochastic vibratory disturbances, using a resonant energy harvester.Although the theory is general, the target application of the paper concerns ocean wave energy harvesting. The control technique involves the use of a causal discrete-time feedback algorithm to dynamically optimize the power extracted from the waves. The theory assumes that the input impedance of the converter is known precisely, but that a priori models are unavailable for the characterization of the stochastic behavior of the incident waves as well as the transfer functions characterizing their hydrodynamic excitation of the system.For these assumptions, we develop an adaptive control technique, which adapts the feedback law at each time step based on updated estimates for the stochastic disturbance model, obtained through a subspace-based system identification algorithm. The technique is demonstrated on a simulation example pertaining to a cylindrical surface-floating wave energy converter in heave.