Remove the screws one by one, rub the threads over a bar of soap or beeswax, and reinsert them using a screwdriver. This lubricates the screws and prevents them squeaking in the frame.
Lubricate the joints of the bed frame wherever two pieces join together. If you are using a metal bed frame, use WD-40. If you are using a wooden bed frame, sprinkle graphite powder in the joint. Instead of graphite powder, you can also use talc or baby powder.
Remove each nut and bolt one by one, and place a washer between the head of the bolt and the bed frame and between the bed frame and the nut. This cuts down on any noise from the bolt and nut.
Take the bed frame apart completely, and put it back together, if all else fails.