They could be frightened, playing a game or just feel safe under the bed. It is a sign that all is not well in the household and they need to encouraged to come out and lay where they can be part of the family.
Its probably because they want some alone time or they want to play hide and seek besides cats normally do this perhaps your dog wants to be a cat you never know
If they are new dogs to your house they might be afraid the same goes if you just moved yet if he is not new something might be upsetting him
Possibly just a natural instinct to seek shelter. My outside dogs like to lay under the porch.