That's always a good question!

Since we're talking about General Relativity (the top of the thread introduces the stress-energy tensor, and a particular solution to the Einstein Field Equations) let's talk in those terms. We can also talk in those terms because it is the more-fundamental theory from which Special Relativity (which gives the famous E=mc^2) can be derived.

The "stress-energy tensor" determines the curvature of spacetime. It goes by other names: the matter tensor, the energy-momentum tensor, and so forth, largely depending on how one wants to interpret the tensor components in a particular problem.

Three quick paragraphs with some reference to the mathematics:

You can write the energy-momentum tensor's components as a 4x4 matrix where each cell represents a flux of momentum from one direction to another. Momentum which "hangs around" flowing only from the past to the future corresponds to the m in "E=mc^2" either very locally or more globally in a spacetime which has no gravitation whatsoever. Since a nonzero "m" represents a nonzero value of the energy-momentum tensor, and since the energy-momentum determines the curvature of spacetime, "E=mc^2" is really just an excellent approximation that is better when m is small.

The fuller Special Relativity relation is E^2= (mc^2)^2 + (pc)^2 where we square to get rid of sign problems and where p represents linear momentum; if there is no momentum and the mass stays at the spatial origin (moving only in time) in our reference coordinates, then all but one component of the energy-momentum tensor is zero, and the one remaining one is totally determined by "m".

If we (non-gravitationally) impart momentum onto our m then p becomes nonzero and so does at least one other component of the energy-momentum tensor.

Summing up: mass sources energy-momentum, which determines curvature. Moving mass sources even more energy-momentum, and so greater curvature.

In your question about the cup, let's apply a restriction: we use the same number of water molecules at all times.

As we heat the ice or water, the motion of the water molecules relative to the centre of the coffee cup (or the overall centre-of-mass or the overall centre-of-momentum) increases. Increased motion means increased momentum. This in turn means a greater curvature is sourced by the heated molecules, or if you like, that there is a greater "active" gravitational interaction for the hot water than for the cold water or ice. "Active" in the sense of small things falling towards it. It virtually certianly also has an identically larger "passive" gravitational interaction, where "passive" is in the sense of falling towards an object that makes it seem like a very small thing. (We have excellent experimental evidence that passive and active interaction strengths are effectively identical, and the underlying theory demands it, ignoring some details about gravitational back-reaction which even experts won't want to think too hard about.)

So if we use a very sensitive scale we can measure that the hot water with exactly N molecules of hot water weighs more than the exactly N molecules of cold water. Ignoring gravitation again, we see that E is greater in the hot water case, but because there is a larger average value for p (momentum) for each of the molecules. The "m" remains effectively the same in the hot and cold water. Rest mass (m_0) is properly determined by the count of water molecules when they are completely free of momentum (including internal momentum, right down to the momentum of photons, electrons, quarks and gluons), which gives you the answer to when E is lowest for the cup of exactly N molecules of water. (It's at absolute zero!)

Back to gravitation: the minimum influence on the curvature of spacetime by the N molecules of water is when they are at absolute zero.

The difference is very tiny at the sorts of temperatures you're asking about. However, if we could somehow confine the N molecules of water into a magical box of the volume of the coffee cup, and heat the water molecules to the point where the molecular bonds break, the atoms all ionize, the oxygen nuclei disintegrate into protons, the protons disintegrate into a quark-gluon plasma, and keep going through several orders of magnitude (wherein we may discover new subatomic physics!) then as we go the "active" and "passive" gravitational interactions of the confined matter will grow substantially. It will become very heavy (passive interaction: hard to hold above the lab's floor, assuming the ultra high energy stuff didn't vapourize everything around it) and noticeably start affecting the trajectories of ever larger things (dust, pencils, lab assistants...). In the extreme, we can add so much momentum to to the stress-energy-momentum tensor the magical container encloses that it collapses into a black hole.

In essence this is what happens in the cores of neutron stars when they collapse into black holes: the internal pressure and temperature gets so high that an event horizon forms. The "container" is a few solar masses worth of incredibly dense "nuclear pasta" and other exotic stuff we don't know much about yet, and is more the size of the city the magical-container lab is in than the lab itself.

One last thing: the total value of the stress-energy tensor at a given point is observer-independent -- an ultrarelativistic observer passing by the lab and a scientist standing still in the lab will both agree on the total stress-energy-momentum of each container of water. However, different observers may prefer to split the total tensor value into its sixteen components in different ways; indeed, any single observer is free to do so because the splitting is coordinate-dependent and one is free to select from an infinite set of systems of coordinates in describing spacetime or a small patch thereof.

Because of this sort of coordinate- and observer- independence ("general covariance", technically) modern physics uses tensor fields as fundamental objects and either copes with the heavyweight mathematics that requires or reduces tensors by imposing special conditions on coordinates and on how coordinate-dependent vector-values are extracted from the tensors.

Finally, the stress-energy-momentum tensor is contributed to by all the fields of matter, so this would (where not excluded for convenience) include the classical electromagnetic tensor field, or the fields of quantum electrodynamics, or the fields of the Standard Model of particle physics. The contribution to stress-energy for known matter is always non-negative. So when considering classical or quantum matter fields, where there are nonzero field-values there is nonzero stress-energy. In heating up the water molecules we are also creating [a] more photons and [b] higher-momentum photons. Photons carry nonzero momentum and so contribute to the "p" term in E^2=(mc^2)^2+(pc)^2 or more fundamentally they add to the total tensor-value of the energy-momentum tensor.

I hope this is a helpful answer.

PS: I should have said that absolute zero is probably not physically achievable in our universe, but to the extent things can get very close to absolute zero (attokelvins or colder) we can always describe a relatively-moving observer who will think the object is warmer than someone at rest with respect to it (and some ultrarelativistic observers might think it's rather hot, spraying out a thermal bath of kilokelvin photons!). Nobody knows what the quantum chromodynamics equivalent of absolute zero would be, so that's always happening, and the momenta of the quarks and gluons thus don't completely vanish.