Strain engineering is one of the most effective approaches to manipulate the physical state of materials, control their electronic properties, and enable crucial functionalities. Because of their rich phase diagrams arising from competing ground states, quantum materials are an ideal playground for on-demand material control, and can be used to develop emergent technologies, such as adaptive electronics or neuromorphic computing. It was recently suggested that complex oxides could bring unprecedented functionalities to the field of nanomechanics, but the possibility of precisely controlling the stress state of materials is so far lacking. Here we demonstrate the wide and reversible manipulation of the stress state of single-crystal WO3 by strain engineering controlled by catalytic hydrogenation. Progressive incorporation of hydrogen in freestanding ultra-thin structures determines large variations of their mechanical resonance frequencies and induces static deformation. Our results demonstrate hydrogen doping as a new paradigm to reversibly manipulate the mechanical properties of nanodevices based on materials control.