The magnet's energy comes from magnetic dipole moment.
The real cause of magnetic dipole moment is the magnetic dipole moment of electrons in the magnet, and that is a multiple of spin because spin has deep reasons to do with the structure of angular momentum.
Gravity does not pull the magnet down. Stress-energy bends spacetime, and the magnet is following a geodesic towards the center of mass.
So the top magnet is in freefall on a geodesic towards the center of mass, and the other bottom magnet on the ground is repelling it and the top magnet levitates.
The two magnet's are exchanging virtual photons and those are excitations of the magnetic field. The EM force is what keeps the top magnet levitating.
So the top magnet is following a geodesic in freefall through bent spacetime and the magnetic fields of the bottom and top magnet repel each other.
So the two forces are the two magnetic fields' forces that repel.
The net of these two forces would in free space be the same levitation.
In this case both magnets are in free fall on a geodesic towards the center of mass.
The bottom magnet is levitated by the surface of Earth (because the atomic and molecular structure and the repulsive EM force of the EM fields between atoms of the surface and the bottom magnet).
The top magnet is levitated by the repulsive force between the two magnet's magnetic fields' force.
The EM repulsion between the bottom magnet and the Earth's surface is so that the distance between them becomes hardly visible.
The EM repulsion between the top and bottom magnet is so that the distance between them is visible.
So where does the energy come from that levitates the bottom magnet on the surface of Earth? It is the Pauli exclusion principle, Heisenberg uncertainty principle, and the EM repulsion between the atoms in the bottom magnet and the surface of Earth.
It comes from the electron's energy, where does that come from? Electrons around the nuclei are in vacuum, and are in certain energy levels around the nuclei as per QM. They are on the certain energy levels because those levels are stable, and the electron is moving in vacuum and does not need extra energy to do so. In vacuum, the electron keeps its momentum. It does not need extra energy. Just like any object in vacuum would keep its momentum.
The top and bottom magnet's fields' forces energy comes from the electron's energy too. The electron's in the magnets keep exchanging virtual photons. The electron's do not need extra energy to do so because the net energy of both magnets together is the same.