Thin suspended nanostructures with a two-dimensional electron gas can be used as nanoelectromechanical systems in which electron transport is piezoelectrically coupled to mechanical motion and vibrations. Apart from practical applications, these systems are interesting for studying electron transport under unusual conditions, namely, in the presence of additional mechanical degrees of freedom. In the present paper, we analyze the influence of the bending on the density of a gated two-dimensional electron gas contained in a suspended membrane using the Thomas-Fermi approach and the model of pure electrostatic screening. We show that a small bending is analogous to a small change in gate voltages. Our calculations demonstrate that the density change is most prominent near the edges of the conductive channel created by negatively biased gates. When moving away from these edges, the bending-induced density change rapidly decays. We propose several methods to increase the magnitude of the effect, with the largest benefit obtained from coverage of the conductive channel with an additional grounded gate. It is shown that, for a conductive channel under a bare surface, the largest effect can be achieved if the two-dimensional electron gas is placed near the middle of the membrane thickness, despite the bending-induced strain is zero there.