Carbon nanotubes and graphene offer unique scientific and technological opportunities as nanoelectromechanical systems (NEMS). Namely, they have allowed the fabrication of mechanical resonators that can be operable at ultra-high frequencies and that can be employed as ultra-sensitive sensors of mass or charge. In addition, nanotubes and graphene have exceptional electron transport properties, including ballistic conduction over long distances. Coupling the mechanical motion to electron transport in these remarkable materials is thus highly appealing. In this talk, I will review some of our recent results on nanotube and graphene NEMSs, including the control of the mechanical oscillation using individual electrons tunneling onto and out of the nanotube, and the study of the thermal contraction of nanotubes.