Sailplanes, when launched, need to extract energy from vertical motion of the air. The usual procedure is to circle and climb in vertical currents of limited spatial dimension (‘thermals’) under cumulus clouds and thereafter to exchange the gained height into distance by gliding out to the next cumulus cloud. While doing so, sailplane pilots will often encounter larger-scale regions where the atmosphere moves in a vertical direction. Until recently the optimal strategy in such situations was assumed to be to fly slower through regions with upward moving air and faster through regions with downward moving air. Only a few years ago it was discovered both in theory, from energy considerations, as well as in practice, by contest pilots, that in some circumstances more energy could be extracted from the atmosphere when the loadfactor, i.e., the total aerodynamic lifting force on the wings divided by the weight, was varied. The research reported in this paper was set up to investigate this phenomenon. To that end a simple dynamic model is assumed for the sailplane, and the optimization problem is formulated as an optimal control problem with terminal constraints. This optimal control problem is solved numerically for a number of different widths and strengths of the vertical currents encountered. The computer program used for this purpose is a rather general continuous optimal control program based on the use of (conjugate) gradients in function space and a projection operation to account for the terminal constraints.