There is a pressing need for durable energy harvesting techniques that are not limited by intermittency, and capable of persistent and continuous operation in a variety of environments.Our laboratory has previously identified ambient thermal fluctuations as potentially abundant, ubiquitous sources of such energy. In this work, we present a mathematical theory for the operation and design of a thermal resonator interfaced with optimized thermal diodes on its external boundaries with the environment. We show that such a configuration is potentially able to produce single polarity temperature difference drastically exceeding that of previously reported thermal resonators by a factor of 5. We further introduce an experimental testbed of mechanical thermal switches capable of mimicking thermal diodes with a possibility to tune thermal rectification in a broad range. The testbed allows us to identify additional design rules for our system dictated by material properties. Lastly, our theory establishes a generic performance metrics over thermal diodes available in the literature. The established framework will help to design novel thermal elements, build efficient thermal harvesting systems, and compose nonlinear thermal circuits.