The overarching objective of this research is to use machine learning tools to address the design and real-time control of active systems, focusing specifically by tethered airborne wind energy and ocean current energy systems. In both applications, along with numerous other engineering applications, data is expensive to generate. In particular, generating new plant designs is costly, and any adjustments to the controller must be performed in an environment that is continually changing. To address these challenges, we leverage a data-driven optimization strategy called Bayesian Optimization, which is specifically tailored to optimization problems for which a model does not exist (necessitating expensive data collection) or must be controlled with expensive experiments. This dissertation extends the current state of the art in Bayesian Optimization to enable Bayesian Optimization to be performed in real-time, in a spatiotemporally-varying environment. The techniques described in this dissertation have been applied using real-data, to the real-time altitude and depth optimization of airborne wind and ocean current turbine energy systems, respectively. Furthermore, the techniques have been applied to the nested co-design (combined plant/controller design) of an airborne wind energy system.