There are so many different designs of bed rail ends and widths, plus headboard methods of attachments, that have been used that it's impossible to give you one answer. You just have to see what you have available on the headboard and try to go from there.
If your headboard really is older than 1978, I would have it sandblasted, then repaint. This is to be sure that there is no possibility that it has lead based paint. You might not think that this is not an issue today but you never know what tomorrow will bring. Since you only have a little to paint, I would use a spray primer first and then a spray enamel. The sandblasting not only removes old paint but it also gives the surface a nice "tooth" to hold new paint. Get the primer on pretty quickly after the blasting as it does not take long for rust to start up on bare metal.