No, a table does not expend energy to keep its top from falling.
Energy is an example of a "state function". A "state" is just the particular way a system is set up - this atom is here, that atom is there, this is the electromagnetic field, etc etc. When you specify just where everything is and what the nature of the interactions is, you have the state.
For a system as big as a table, we do not actually specify where every atom is to describe the state. We just say "there is 20 kg of wood with this density at this temperature in this shape..." until we have given a good enough description.
Every possible state has some energy associated with it. Given a state, you can apply some formulas to calculate the energy. For example, for the table, there is thermal energy stored in the random motions of the molecules and there is elastic energy stored in the slight deformations in the table that counter the force of gravity pulling the table down. We can use this to find the energy in the table. However, this energy is not going anywhere or doing anything. It's just sitting there. Or really, it's just a label used to describe what the state is. I wrote more about what energy is in this answer.
As long as the state of the table does not change, its energy does not change. This is probably good enough to intuitively answer your question. The table is just sitting there. It stays in the same state all the time. Its energy therefore doesn't change, so no energy is expended. This is why a table does not "get tired" the way a person does.
Technically, though, that fact that the energy of the table doesn't change simply means that however much energy flows into the table also flows out of the table.
The energy flow in and out of the table (and energy flow in general) is divided into two categories: heat and work. Work is things like mechanical pushes on the table. Heat is things like conduction with the surrounding air molecules and radiation (i.e. infrared light given off and absorbed by everything all the time) cooling or heating the table.
Unless there's an earthquake or some such going on, the table is mechanically isolated - no work is being done on it. There are forces on it, but work is a product force*motion. Since there is no motion, there is no work. Therefore, the only energy going in or out is heat. The table gives off radiation, but unless it's colder or hotter than the surrounding room, it absorbs and emits radiation at the same rate. Likewise, the table loses heat through conduction, but gains it back at the same rate.
The electromagnet you mentioned is different from the table. If you were to measure its temperature, you'd find that the electromagnet is consistently hotter than the surrounding room. It is continually converting electrical energy into thermal energy and giving off this thermal energy as heat via conduction and radiation. This is not strictly necessary to levitate something. The levitating object is not gaining energy. All the energy is going into heating the electromagnet. This is an artifact of the way that the electromagnet works. Current runs through some wires, and the wires have resistance. If we could get rid of the resistance of the wires, we could levitate the object without an input of energy, as mentioned by dmckee in the comments.
If a human being were to hold the table up, they would have to expend energy to do so, and eventually would get tired. But this is similarly because humans are simply inefficient. The energy they expend is not going into holding the table up. It is again going into heat. The person is continually converting chemical energy stored in their body into heat.
If the person were in the process of lifting the table, so that the table were rising, then the state of the table would change. As it rose higher up, it would have more gravitational energy. Because its energy is increasing, we know energy must be coming in from somewhere. So while the table is rising, the person lifting it is doing work on it. But once the table is stationary, its energy is unchanging and no energy need be "spent", where "spent" energy means that the energy is converted from one form (e.g. chemical energy in the human body or electrical energy in a motor) into another form (gravitational potential energy of the table).
If the table eventually breaks down and falls, its gravitational and elastic energy will go down. They will be converted into heat - the table, the floor it lands on, and the air it travels through will all heat up a little bit. Usually, we don't notice this heating very much because atoms are generally whizzing around at hundreds to thousands of miles per hour, so the small speeds of everyday life are not very significant. However, if you put a lot of mechanical energy into a small system, you can notice this heating. For example, by banging on the head of a nail with a hammer, you can heat the nail head, or by rubbing your hands against each other vigorously you can heat up the surface of your skin.
The second law of thermodynamics says that entropy in an isolated system can only increase. A world in which the table has collapsed and released its gravitational and elastic potential energy as heat has higher entropy than one where the table that has not done so. This means that if you leave the table alone long enough, it will eventually collapse and will not rebuild itself. In order to reduce the entropy of the system by rebuilding the table, you would need to do work on the system, thus "expending energy" on it. So ultimately, it takes some small energy input to keep the table up because without some sort of maintenance, the table will eventually fall apart. However, the second law doesn't place a limit on how long this has to take; the energy input can be arbitrarily small.
The study of the way that energy can be "spent" by converting it from one form to another is called thermodynamics.