During cancer progression, extracellular matrix (ECM) deposition increases tissue stiffness, which induces epithelial-mesenchymal transition (EMT), chromatin reorganisation and changes in gene expression. Many EMT-associated genes are known to be regulated by the chromatin regulator enhancer of zeste homolog 2 (EZH2), which responds to transforming growth factor (TGF)β1 signalling – a major driver of EMT – by catalysing the methylation of histone H3 at lysine 27 (H3K27m3). Here (Sacco et al., 2024), Esther Gomez and colleagues investigate how matrix mechanics and cellular contractility affect EZH2 function. The authors culture normal murine mammary gland (NMuMG) cells on hydrogels with stiffness levels mimicking healthy (soft) and diseased (stiff) tissues. They find that on stiff substrates, TGFβ1 signalling promotes cytoskeletal reorganisation associated with EMT, induces EZH2 phosphorylation and nuclear localisation, and increases H3K27me3 levels. Interestingly, reducing TGFβ1-induced changes in contractility by inhibiting Rho-associated kinase (ROCK) or myosin II signalling attenuates the nuclear localisation of EZH2 and decreases H3K27me3 levels. Moreover, inhibiting EZH2 activity reduces TGFβ1-induced EMT, suggesting that EMT regulation occurs downstream of EZH2. Together, these results suggest that matrix stiffness and cell contractility modulate the epigenetic state of cells in response to TGFβ1 via EZH2, providing new insights into the regulation of EMT.