X-shaped radio galaxies are defined by their peculiar large-scale radio morphology. In addition to the classical double-lobed structure they have a pair of low-luminosity wings that straddles the nucleus at almost right angles to the active lobes, thus giving the impression of an 'X'. In this paper we study for the first time the optical spectral properties of this object class using a large sample (~50 sources). We find that the X-shaped radio population is composed roughly equally of sources with weak and strong emission line spectra, which makes them, in combination with the well-known fact that they preferentially have radio powers intermediate between those of Fanaroff-Riley type I (FR I) and type II (FR II) radio galaxies, the archetypal transition population. We do not find evidence in support of the proposition that the X-shape is the result of a recent merger: X-shaped radio sources do not have unusually broad emission lines, their nuclear environments are in general not dusty, and their host galaxies do not show signs of enhanced star formation. Instead, we observe that the nuclear regions of X-shaped radio sources have relatively high temperatures. This finding favours models, which propose that the X-shape is the result of an overpressured environment.