it would proabably be easier to attach it to the wall. Are you making it?
It is a older waterbed headboard with mirror in center and shelves,
I would agree with Sarah on this. Fasten it to the wall and just place the bed next to it. You can make brackets to adjust the connection points, but It may be simply to difficult to do in this fashion.
Make a bench type frame to hold it, then put the bed up to it also. They have some weight to them, I think I would use the bench option. Also I have seen them repurposed behind bars to hold bottles, bar accessories and upside down wine glasses etc. Looks so cool...this would have to be attached to studs in the walls to hold it flush.