We study the convection zones in the outer envelope of hot massive stars which are caused by opacity peaks associated with iron and helium ionization. We determine the occurrence and properties of these convection zones as function of the stellar parameters. We then confront our results with observations of OB stars. A stellar evolution code is used to compute a grid of massive star models at different metallicities. In these models, the mixing length theory is used to characterize the envelope convection zones. We find the iron convection zone (FeCZ) to be more prominent for lower surface gravity, higher luminosity and higher initial metallicity. It is absent for luminosities below about $10^{3.2}Lsun$, $10^{3.9}Lsun$, and $10^{4.2}$Lsun$ for the Galaxy, LMC and SMC, respectively. We map the strength of the FeCZ on the Hertzsprung-Russell diagram for three metallicities, and compare this with the occurrence of observational phenomena in O stars: microturbulence, non-radial pulsations, wind clumping, and line profile variability. The confirmation of all three trends for the FeCZ as function of stellar parameters by empirical microturbulent velocities argues for a physical connection between sub-photospheric convective motions and small scale stochastic velocities in the photosphere of O- and B-type stars. We further suggest that clumping in the inner parts of the winds of OB stars could be caused by the same mechanism, and that magnetic fields produced in the FeCZ could appear at the surface of OB stars as diagnosed by discrete absorption components in ultraviolet absorption lines.