Typically, it's a harmless behavior.
Dogs will hide under the bed (or another dark, small area) mostly because they find it a comfortable spot to relax and take a nap.
There are other, more concerning reasons why your dog could be hiding under the bed, including anxiety or illness.