Remove the mattress from the bed rails. Check the bed to see if it still squeaks. The squeaking sound could be coming from a pinched spot where the mattress meets the bed frame, and not from the bed rails themselves.
Check each bolt along each of the bed rails. Try to move each bolt, then tighten any that are easy to turn by hand. A loose bolt can cause bed rails to squeak.
Spray any bolts that continue to squeak with a spray lubricant. Give the bolts a good coating, allow it to dry, then test the bed rails for squeaks again.
Remove any squeaking bolts and reinsert them with new plastic washers. The plastic washer will prevent metal from rubbing on metal and causing squeaks.