Pulsar timing arrays (PTAs) are expected to detect gravitational waves (GWs) from individual low-redshift (z≲ 1.5) compact supermassive (M≳ 109 M⊙) black hole (SMBH) binaries with orbital periods of ∼0.1–10 yr. Identifying the electromagnetic (EM) counterparts of these sources would provide confirmation of putative direct detections of GWs, present a rare opportunity to study the environments of compact SMBH binaries and could enable the use of these sources as standard sirens for cosmology. Here we consider the feasibility of such an EM identification. We show that because the host galaxies of resolved PTA sources are expected to be exceptionally massive and rare, it should be possible to find unique hosts of resolved sources out to z≈ 0.2. At higher redshifts, the PTA error boxes are larger, and may contain as many as ∼100 massive-galaxy interlopers. The number of candidates, however, remains tractable for follow-up searches in upcoming wide-field EM surveys. We develop a toy model to characterize the dynamics and the thermal emission from a geometrically thin gaseous disc accreting on to a PTA-source SMBH binary. Our model predicts that at optical and infrared frequencies, the source should appear similar to a typical luminous active galactic nucleus (AGN). However, owing to the evacuation of the accretion flow by the binary’s tidal torques, the source might have an unusually low soft X-ray luminosity and weak ultraviolet (UV) and broad optical emission lines, as compared to an AGN powered by a single SMBH with the same total mass. For sources at z∼ 1, the decrement in the rest-frame UV should be observable as an extremely red optical colour. These properties would make the PTA sources stand out among optically luminous AGN, and could allow their unique identification. Our results also suggest that accreting compact SMBH binaries may be included among the observed population of optically bright, X-ray-dim AGN.