Why are there sometimes fences or borders around the beds in castle bedrooms? by Deirdre Beecher

Answer by Deirdre Beecher:

I’m not sure exactly what you mean by fences. Many early beds are built like boxes, because mattresses didn’t hold their shape the way modern ones do. Depending on wealth, they were bags filled with straw, horsehair or feathers. A border was needed to keep them in the bed.

The bed shown below also has a border above the bed, this is part of the curtain rail. Practical for both warmt and privacy. It is highly decorated because beds were luxury goods, high status items.

Why are there sometimes fences or borders around the beds in castle bedrooms?