I knew there was a way instead of bolting to the wall like a lot of DIY suggest!
I went for another cheap and easy solution.
BC cut me three 17” pieces of a 4X4 and a 42” long piece of 2X4.
We screwed the legs (the 4X4) to the 2X4 and then mounted it to the bottom of the pallet.
The bed frame will be bolted directly into the 4X4’s.