keeping straight wall bed leg with shelf

^^^

It looks like it has a single pivot on the bed end of the arm, so adding more weight would make it more likely to sit vertical and less likely to swing, no?