GeTe-Sb2Te3 alloys have been widely studied for use in rewritable media, and in recent years, they have emerged as excellent thermoelectric materials, with reports of zT>2 for Ge-rich compositions. GeTe-Sb2Te3 alloys exhibit a solid-state phase transition from a layered structure with rhombohedral symmetry to a cubic rocksalt structure, which plays an important role in their thermoelectric behavior. Here, we investigate the impact of the phase transition on the thermal expansion and elastic moduli of (GeTe)17Sb2Te3 using high-temperature X-ray diffraction and resonant ultrasound spectroscopy. The high-temperature elastic moduli of GeTe, Sb2Te3, and Bi2Te3 were also measured for comparison. While it is typical for materials to soften with increasing temperature due to thermal expansion, our study reveals anomalous hardening of the elastic moduli in (GeTe)17Sb2Te3 at temperatures below the phase transition, followed by further hardening at the transition temperature. In contrast, the elastic moduli of GeTe, Sb2Te3, and Bi2Te3 soften with increasing temperature. We attribute the anomalous hardening of (GeTe)17Sb2Te3 to the gradual vacancy diffusion accompanying the transition from a layered to a cubic structure. The stiffening elastic moduli lead to increasing speed of sound, which impacts the lattice thermal conductivity by flattening the temperature dependence.