How to build long, chunky bed supports
There is not a convincing reason this has to be any sort of box structure. In fact for a bed support like that a single USA type of 2x8 (actual 1.5"by 7.5" 38mm by 190mm) on edge on each side of the bed would be way more than enough support. The overall weight can also be accommodated by using proper means to join the ends to the vertical posts. 

If you like the wider top surface of the beam next to the side of the bed then that could be easily attained by using two of the typical 2x8s side by side or spread them a small amount and then cap the top and bottom with thin plywood. MDF would work for the cap too but is going to be more susceptible to damage over time if it gets wet.