Based on a linear viscoelastic model, we study the coexistence and transition of gravity waves and surface elastic waves in a half-space of unconsolidated sediment. The dispersion relation and surface response are calculated as a function of the period and rigidity of the system. The dispersion relation shows two branches. One branch corresponds to a Rayleigh wave for short-wave periods, and it becomes a leaky surface wave as the period increases. The second branch shows a linear dependence of the phase velocity with period as expected for gravity waves. As the period increases, this branch evolves into a leaky surface wave joining the first branch. The surface response function, which is related to the vertical displacement, is also calculated. Two distinct peaks are present in the surface response function. One corresponds to a classical Rayleigh wave, while the second is a gravity-driven mode whose amplitude is strongly dependent on the wave period and soil rigidity.