In this study we first develop a flight mechanics model for supercavitating vehicles, which is formulated to account for the dependence of the cavity shape from the past history of the system. This mathematical model is governed by a particular class of delay differential equations, featuring time delays on the states of the system. Next, flight trajectories and maneuvering strategies for supercavitating vehicles are obtained by solving an optimal control problem, whose solution, given a cost function and general constraints and bounds on states and controls, yields the control time histories that maneuver the vehicle according to a desired strategy, together with the associated flight path. The optimal control problem is solved using a novel direct multiple shooting approach, which is formulated to properly handle conditions dictated by the delay differential equation formulation governing the dynamic behavior of the vehicle. Specifically, the new formulation enforces the state continuity line conditions in a least-squares sense using local interpolations, which supports local time stepping and drastically reduces the number of optimization unknowns. Examples of maneuvers and resulting trajectories demonstrate the effectiveness of the proposed methodology and the generality of the formulation. The results are also compared with those obtained from a previously developed model governed by ordinary differential equations to highlight the differences and demonstrate the need for the current formulation.