Mass is one of the most important concepts in physics and its real understanding represents the key for the formulation of any consistent physical theory. During the past years, a very interesting model of inertial and gravitational mass as the result of the reaction interaction between the charged particles (electrons and quarks) contained in a given body and a suitable "fraction" of QED Zero Point Fields confined within an ideal resonant cavity, associated to the same body, has been proposed by Haish, Rueda and Puthoff. More recently, the author showed that this interpretation is consistent with a picture of mass (both inertial and gravitational) as the seat of ZPF standing waves whose presence reduces quantum vacuum energy density inside the resonant cavity ideally associated to the body volume. Nevertheless so far, the ultimate physical origin of such resonant cavity as well as the mechanism able to "select" the fraction of ZPF electromagnetic modes interacting within it, remained unrevealed. In this paper, basing on the framework of QED coherence in condensed matter, we'll show mass can be viewed as the result of a spontaneous superradiant phase transition of quantum vacuum giving rise to a more stable, energetically favored, macroscopic quantum state characterized by an ensemble of coherence domains, "trapping" the coherent ZPF fluctuations inside a given volume just acting as a resonant cavity. Our model is then able to explain the "natural" emergence of the ideal resonant cavity speculated by Haish, Rueda and Puthoff and its defining parameters as well as the physical mechanism selecting the fraction of ZPF interacting with the body particles. Finally, a generalization of the model to explain the origin of mass of elementary particles is proposed also suggesting a new understanding of Compton's frequency and De Broglie's wavelength. Our results indicates both inertia and matter could truly originate from coherent interaction between quantum matter-wave and radiation fields condensed from quantum vacuum and also give novel and interesting insights into fundamental physical questions as, for example, the structure of elementary particles and matter stability.