A quantitative theory of attosecond pulse generation in relativistically driven overdense plasma slabs is presented based on an explicit analysis of synchrotron-type electron trajectories. The subcycle, field-controlled release, and subsequent nanometer-scale acceleration of relativistic electron bunches under the combined action of the laser and ionic potentials give rise to coherent radiation with a high-frequency cutoff, intensity, and radiation pattern explained in terms of the basic laws of synchrotron radiation. The emerging radiation is confined to time intervals much shorter than the half-cycle of the driver field. This intuitive approach will be instrumental in analyzing and optimizing few-cycle-laser-driven relativistic sources of intense isolated extreme ultraviolet and x-ray pulses.