You can try using really strong material like chains on each of four sides and also attach to ceiling. You can change the height easily too. I’m sure there are other kinds of material that wouldn’t be so obtrusive looking if you don’t like the chains. I saw this a a friends house. As a contractor he did this himself.
If you don't want to anchor it to the ceiling you could try this look. Also you could use this look and add chains or ropes to the ceiling for aesthetics without having to worry about the ceiling actually supporting the weight of the bed and bodies. https://www.hometalk.com/28780880/diy-platform-bed-with-floating-night-stands