Take the mattress and the box spring off of the bed frame and lean them securely against a wall.
Unscrew one screw from the frame using a screwdriver.
Inspect the screw and make sure the threads are not stripped. If the threads are stripped, replace the screw with one of the same size or slightly larger.
Rub the threads of the screw thoroughly along a bar of beeswax. Beeswax is an excellent wood screw lubricant because when friction is introduced, the wax melts slightly, providing more lubrication, but when the friction stops, it re-hardens, cementing the hold.
Replace the screw in the bed frame with the screwdriver. Tighten the screw firmly, holding the slats of the wood together securely.
Repeat steps 2 through 5 for every screw in the entire bed.
Place the mattress and the box spring on the bed again.