Sit on the bed and move around on it to figure out where the squeak is located. Shift your weight as you do while sleeping to find out which bed parts are rubbing together to make the noise.
Remove the mattress from the bed frame, revealing the metal underneath.
Spray down all the joints in the area where you heard the squeaking. Even if the joint was not squeaking, the oil can prevent it from acquiring a squeak in the future.
Put the mattress down and sit on it again, shifting your weight around. This allows you to discover if you need to oil the bed more or if the joints are properly lubricated.