I have no idea if this will actually work or how heavy duty it would even need to be to hold 2 boards, but this dumb idea just came to me.
This headphone hook clamps to my desk and looks like it could clamp to the bed rail if it’s tall enough. The arm should be able to hold one track, 2 if they stack tight. Use one for each end of the boards, strap the boards together. Maybe search around and see if there are bigger/beefier versions of the same thing.
It’s basically just a c-clamp with an arm sticking out of it.
These are $12, and they can hang 2 pairs of cans under a desk. They're quite study.
https://www.amazon.com/gp/product/B07DWXZ8XG/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1