The potential energy of a material is its ability to do work. So I would suspect the potential energy to increase during phase changes that increase entropy (solid $\rightarrow$ liquid and liquid $\rightarrow$ gas), and decrease in the opposite direction.
However, what about when the temperature is raised for a solid, up until the melting point - will the potential energy increase? The heat from a 1500 K gold plate could do work on liquid water (evaporate) to a higher extent than a plate at 300 K, so I guess the potential energy has increased. So would the potential energy as a function of temperature, of an arbitrary material, look something like this ($K$ should be $T$)?