Need advice on propping up head of bed

I apologize for not looking at the OP’s diagrams before making my original suggestion. I will add this as penance: Bed, Bath and Beyond has these which work pretty well, but you’d have to buy 3 boxes of 4 @ $25/each to get 3 across the middle and 6 for the head of the bed. And I’m not sure what you would do for the slant where the foot rests inside the riser, but Dopers are nothing if not creative. You’ll think of something.