The internal energy is always a function of the extensive variables of the system under consideration $U(S,V)$ for example when the work being done involves changes in volume $PdV$, or $U(S,\varepsilon)$ when we want to consider general strains $\sigma_{ij} d\varepsilon_{ij}$, or even $U(S,D)$ if the material has a polarization expressed as an electric displacement (polarization) in an electric field $EdD$.
For a piezoelectric, the mechanical properties (strain) and electrical properties (polarization) are in fact coupled. If the polarization arises due to mechanical stress as for the direct piezoelectric effect then $$D_i = d_{ijk} \sigma_{jk}$$ where $d_{ijk}$ is the piezoelectric strain tensor. When an electric field results in a material strain as in the converse piezoelectric effect we have
$$\varepsilon_{ij}=d_{ijk}E_i$$
We can write the general form of the internal energy as
$$dU(S,D,\varepsilon) = TdS + EdD + \sigma d \varepsilon.$$
With this potential, or other characteristic potentials that depend on intensive variables that can be controlled in the lab, you can find more coupling equations by investigating the equations of state and the Maxwell relations.