Consider two very strong magnets, one above a wooden table, one below a wooden table. As the two magenets clamp together, wedging the tableplate between them, at least the bottom magnet will experience a force that is stronger or equal to the gravitational force pulling it down. This means that some form of energy must be expended while the two magnets attract each other. How would this expenditure of energy be affecting the system? Heat through pressure in the tableplate? Loss of magnetism in the magnets? Consider the magnets and table being made of such a material that deformation does not need to be considered.
No, there is no energy loss.
Consider just the upper magnet sitting on the table. Is "energy expended" to hold it there, above the ground, against the force of gravity? No; there is potential energy in the system, which can be converted into kinetic energy if you knock the magnet over the edge and it falls.
When the lower magnet is stuck against the table, it's held there by the potential energy in the magnetic field. Nothing is expended, nothing gets warmer or colder or less magnetized.