Double beta decay is a very rare nuclear process and, therefore, experiments intended to detect it must be operated deep underground and in ultra-low background conditions. Long-lived radioisotopes produced by the previous exposure of materials to cosmic rays on the Earth’s surface or even underground can become problematic for the required sensitivity. Here, the studies developed to quantify and reduce the activation yields in detectors and materials used in the set-up of these experiments will be reviewed, considering target materials like germanium, tellurium and xenon together with other ones commonly used like copper, lead, stainless steel or argon. Calculations following very different approaches and measurements from irradiation experiments using beams or directly cosmic rays will be considered for relevant radioisotopes. The effect of cosmogenic activation in present and future double beta decay projects based on different types of detectors will be analyzed too.