This article presents a novel spatiotemporal optimization approach for vertical path planning (i.e., waypoint optimization) to maximize the net output power of an ocean current turbine (OCT) under uncertain ocean velocities. To determine the net power, OCT power generation from hydrokinetic energy and the power consumption for controlling the depth are modeled. The stochastic behavior of ocean velocities is a function of spatial and temporal parameters, which is modeled through a Gaussian process (GP) approach. Two different algorithms, including model predictive control (MPC) as a model-based method and reinforcement learning (RL) as a learning-based method, are applied to solve the formulated spatiotemporal optimization problem with constraints. Comparative studies show that the MPC-and RL-based methods are computationally feasible to address vertical path planning, which are evaluated with a baseline A∗ approach. Analysis of the robustness is further carried out under the inaccurate ocean velocity predictions. Results verify the efficiency of the presented methods in finding the optimal path to maximize the total power of an OCT system, where the total harnessed energy after 200 h shows over an 18% increase compared to the case without optimization.