Depending on how the animal sees the pack leader of the house, dogs who sleep at the foot of the bed generally know their place in the pack. And that’s a good thing.
Every dog is quirky, just like people, and there’s nothing wrong with being nervous or clingy. They just need you to help them feel like they have protection.
It just flat-out feels good to them to be able to sleep beside their human(s). It’s comforting and the action itself — lying down at your feet — means all is right with the world.