This in vitro study evaluated the effect of a prolonged erosive pH cycling on the superficial microhardness change (SMHC) and the erosive wear of different restorative materials. Eighty enamel specimens with prepared cavities of 1·5 × 1·5 mm were randomly divided into eight groups according to the restorative materials used for the fillings (RMGI – resin-modified glass–ionomer, CGI – conventional glass–ionomer, CR– composite resin, A – amalgam) and immersion media used (ERO – erosive medium or SAL – artificial saliva). During 35 days, half of the specimens were immersed in a cola drink (ERO), for 5 min, three times a day, and they remained in SAL between the erosive cycles. The other half of the specimens was immersed in SAL only, for the entire experimental period (control). Data were tested for significant differences by ANOVA and Tukey's tests (P< 0·05). Scanning electron microscopy images were made to illustrate the enamel erosive wear and restorative materials alterations. The mean SMHC (%) and mean erosive wear (μm) of the materials were: RMGI-ERO (30/0·5); CGI-ERO (37/0·5); CR-ERO (−0·3/0·3); A-ERO (−4/0·3); RMGI-SAL (4/0·4); CGI-SAL (−6/0·4); CR-SAL (−3/0·2) and A-SAL (2/0·4). Scanning electron microscopy images showed pronounced enamel erosive wear on groups submitted to erosive pH cycling when compared with groups maintained in saliva. In conclusion, the prolonged pH cycling promoted significantly higher alterations (SMHC and erosive wear) on the glass–ionomer cements than the CR and amalgam.