I will discuss a recently proposed class of models where Dark Matter (DM) is produced via an inverse phase transition. The inverse phase transition can be caused by coupling to some cosmological field. For instance, this field can be a primordial magnetic field, as in e-Print: 2010.03383 or thermal fluctuations of other degrees of freedom, as in e-Print: 2104.13722. In the latter work DM is modelled as a real scalar, which interacts with the hot primordial plasma through a portal coupling to another scalar field. For a particular sign of the coupling, this system exhibits an inverse phase transition. The latter leads to an abundant DM production, even if the portal interaction is so weak that the freeze-in mechanism is inefficient. The model predicts formation of domain walls in the early Universe, long before the inverse phase transition. These domain walls have a tension decreasing with time, and completely disappear at the inverse phase transition, so that the problem of overclosing the Universe is avoided. The domain wall network emits gravitational waves with the peak frequency in the observable range of currently planned observational missions.