An earthquake is commonly described as a stick-slip frictional instability occurring along preexisting crustal faults. The seismic cycle of earthquake recurrence is characterized by long periods of quasi-static evolution, which precede sudden slip events accompanied by elastic wave radiation: the earthquake. This succession of processes over two well-distinguished time-scales recalls the behavior of nonlinear relaxation oscillations. We explore this connection by studying, in the framework of rate-and-state friction, the sliding of two identical slabs of elastic solid driven in opposite directions with a constant relative velocity. Our first innovation is to establish that the motion of a spring-block system is an asymptotic mechanical analogue of the frictional sliding of a single interface from which elastic waves radiate. Due to wave reflection at the boundaries, the equivalent mass of the block M = k(h/cs)2/12 is not independent of the equivalent spring stiffness k, where h/2 denotes the slab thickness and cs is the shear wave speed. Considering a non-monotonic friction law, we show that the relaxation oscillation regime is reached when the characteristic time-scale of frictionless oscillations is much greater than the characteristic time of frictional memory effects: (M/k)1/2 >> L/V*. We combine a composite approximation of the stick-slip cycle and numerical studies to show that the interfacial relaxation oscillations result from the subtle interplay of the non-monotonic properties of the friction law driving the long stress build-up of the quasi-static phase, and the inertial control of the fast slip phase originating from the wave propagation. We discuss the geophysical consequences for earthquake mechanics, and connections between the rate-and-state and Coulomb models of friction.