Steps:

I assembled both base cabinets and screwed them together

I removed the attached screws from the bed legs, drilled small holes into the bottom of the base cabinets for assisting (2 per leg, a pair of 4 for each cabinet) and screwed the legs to the bottom plate

I cut the table top to a fitting length (122,5x47cm for me) and screwed it to the top of the base cabinet.