A cyclic p−y curve model is proposed to study the lateral response of piles in sand under two-way cyclic loads such as wind and wave. The collapse and densification of the soil around the pile caused by the repeated formation of the gap between the pile and soil during the cyclic loading are considered in the proposed model. Based on the nonlinear strain wedge model, the cyclic p−y curve is preliminarily constructed considering the friction characteristics. A collapse and recompression model of sand is established to account for the variation of the relative density of the caved soil and the characteristics of the pile-soil gap. The densification of sand caused by recompression is evaluated using the stiffness hardening index model. The cyclic p−y curve is modified by considering the collapse and densification of sand and its rationality is verified by comparing the results of calculation and centrifugal model test. Furthermore, the strengthening by the caved soil, the characteristics of the cyclic p−y curve, and the soil resistance are analyzed.