Normal-density materials have internal energy, which is the sum of the average energies associated to each of the degrees of freedom. Degrees of freedom can be described as vibrational, translational, and rotational. If you compress this material in such a way that matter cannot escape, you can detect energy escaping in the form of heat.
Now imagine an extremely high-density material such as a neutron star or black hole. I suspect it's not possible to describe the internal energy of (or anything about) an individual atom inside a black hole, since it's impossible to inspect beyond the event horizon, and since I assume that atoms don't exist in an distinguishable form there. But presumably the atoms had energy when they became part of the thing. How is that energy accounted for?