Although you may feel the sag in a king mattress at the top, the sag is actually a fault that runs the entire thickness of the mattress. Modern mattresses don't compress -- an occurrence that would only affect the top half of the mattress. Rather, your king mattress loses tensile strength in strained areas, and sags from the bottom through to the top. Replacing the mattress can cost hundreds of dollars. Fortunately, shoring up the support from below is a relatively inexpensive and easy project.
Remove your mattress from the bed frame. Measure the space between the support rails. This should be very close to the standard measurement for a king-size bed: 60 inches by 84 inches. Although you will feel the sagging from the top of the mattress, reinforcement at the bottom will provide support you'll feel all the way through.
Cut your plywood sheets to match the dimensions. Unless you have unusual access to plywood, you need two sheets to do the job. Cut them so that they match the width of the mattress and half of the length.
Sand one face of each cut plywood board. You don't have to get it perfectly smooth, just smooth enough that it won't snag the underside of your mattress.
Set the boards in place on the rails of your bed frame, and set your mattress in place on top. Sagging mattresses, unless the inner core itself is broken, droop all the way out the bottom. A rigid board underneath helps reduce the degree to which it can sag.
Test your mattress. If you feel little improvement on a two-mattress set, slide the board instead between the two mattresses. In some cases, the top mattress will have the sagging problem, but the box spring beneath will be fine.
Commercial mattress centres sell inflatable "anti-sag" bags you can position directly beneath a sagging area. You can simulate this by placing a roll of eggshell foam or other firm but soft material beneath the sag in your mattress.
This method provides extra support, but can leave your bed feeling harder than before. You can mitigate this by added a layer of soft material -- such as a camping pad or a thick blanket -- between the plywood and your mattress.