There are few things more profoundly annoying than a squeaky mattress. Not only is the sound shrill and irritating, but the source of the squeak is often maddeningly elusive. While the sound often seems to be coming from the mattress, only sometimes is this the part of the bed that's the source of the problem–it could also be the frame or the box spring. To isolate the noise, place the mattress on your floor, lie on it and see if you continue to hear the noise. If you don't, it's not the mattress.
Broken or Defective Spring
Mattresses often have one stubborn spring that, through poor design, gradual wear-and-tear or improper use, may have broken or developed an aberration. Isolating this spring is difficult without ruining the mattress. If the mattress is still under warranty, have it taken in and professionally repaired. If it is no longer covered, consider making a small incision in the fabric over the problematic spring and attempting some minor surgery such as bending the spring to remove the squeak.
Springs Need Lubricating
Sometimes the springs of a mattress, particularly those of a cheaper design, will not need repair or replacement, just some minor lubrication to help them bounce a bit smoother. Again, isolating this spring and repairing it may be difficult.
Mattress is Off-Center
Squeaks can sometimes be caused by a mattress laying off-center, causing the springs or other components to move at an awkward angle. If the mattress has been positioned on the box spring or slats in such a way that it is not lying parallel to the floor, shift it so that it lays flat.
Legs Are Unbalanced
Alternately, the mattress may be positioned fine, but the legs of the frame are positioned so that the mattress is angled. Balance the legs so that they are all of the same height. Or, if the floor is crooked, adjust them so that the mattress is flat.
Slats Need Insulating
Sometimes a bed with flats will develop friction between the slats and the mattress or the slats and the frame. This can be remedied by insulating the slats with a piece of cloth or other soft covering that can absorb the sound.
Frame Needs Tightening
Often the fittings on a frame, especially an older one, will come loose and have to be retightened. Examine the frame for missing components and retighten the screws and fittings. This should help prevent different components of the frame from moving against each other, generating the squeak.
Frame Needs Oiling
Sometimes the frame will be perfectly tight, but its fittings will require oiling. If it's a metal frame, apply some oil to the rivets. If it's a wood frame, try paste wax.