William explained it well. I consulted the 1999 Taunton Press book by Jeff Miller on bed construction.
If you go to Amazon and "peek" inside the book, there are some nice pictures of ledger boards and their use in bed construction. Also allow for space to tuck in blankets, comforters etc., if contemplated. Great picture!