We have measured the sample length change of HTSC single crystals in the superconducting state in a magnetic field. The magnetic field was applied parallel to the crystalline c-axis direction and was swept at a constant rate of 10 mT/s up to 6 T. The sample length change was measured along the ab-plane direction, i.e., perpendicular to the field. We have found for the Bi2Sr2CaCu2O8 single crystals that the relative sample length change (DELTAL/L) is extraordinarily large for a superconductor, on the order of 10(-4). For the case of (La1-xSrx)2CuO4, the amount of magnetostriction was not as large as for the Bi system, but the magnetostriction curves had many similarities. For both compounds, a relaxation phenomenon was observed when the field sweep was suspended at a certain field value. These observations are discussed in relation to flux line pinning.