A handy glasses or phone holder attaches to the board of most IKEA beds.
It snaps together, if you'd like a drop of superglue ensures the sides never come off.
If you add a hole to one of the covers you can easily wire in a phone charger cable as well :)