Aims: We wish to study the origin of the X-ray emission of three massive stars in the Cyg OB2 association: Cyg OB2 #5, #8A, #12. Methods: To this aim, dedicated X-ray observations from XMM and Swift are used, as well as archival ROSAT and Suzaku data. Results: Our results on Cyg OB2 #8A improve the phase coverage of the orbit and confirm previous studies: the signature of a wind-wind collision is conspicuous. In addition, signatures of a wind-wind collision are also detected in Cyg OB2 #5, but the X-ray emission appears to be associated with the collision between the inner binary and the tertiary component orbiting it with a 6.7yr period, without a putative collision inside the binary. The X-ray properties strongly constrain the orbital parameters, notably allowing us to discard some proposed orbital solutions. To improve the knowledge of the orbit, we revisit the light curves and radial velocity of the inner binary, looking for reflex motion induced by the third star. Finally, the X-ray emission of Cyg OB2 #12 is also analyzed. It shows a marked decrease in recent years, compatible with either a wind-wind collision in a wide binary or the aftermath of a recent eruption.