Classical Cepheids (CCs) and RR Lyrae stars (RRLs) are important classes of variable stars used as standard candles to estimate galactic and extragalactic distances. Their multiplicity is imperfectly known, particularly for RRLs. Astoundingly, to date only one RRL has convincingly been demonstrated to be a binary, TU UMa, out of tens of thousands of known RRLs. Our aim is to detect the binary and multiple stars present in a sample of Milky Way CCs and RRLs. In the present article, we combine the Hipparcos and Gaia DR2 positions to determine the mean proper motion of the targets, and we search for proper motion anomalies (PMa) caused by close-in orbiting companions. We identify 57 CC binaries from PMa out of 254 tested stars and 75 additional candidates, confirming the high binary fraction of these massive stars. For 28 binary CCs, we determine the companion mass by combining their spectroscopic orbital parameters and astrometric PMa. We detect 13 RRLs showing a significant PMa out of 198 tested stars, and 61 additional candidates. We determine that the binary fraction of CCs is likely above 80%, while that of RRLs is at least 7%. The newly detected systems will be useful to improve our understanding of their evolutionary states. The discovery of a significant number of RRLs in binary systems also resolves the long-standing mystery of their extremely low apparent binary fraction.