It’s your shield, so it’s up to you.
There is no official “direct” answer to your question, except possibly what’s found in the introduction to the Player’s Handbook, in “How to Play the Game”:
The players describe what they want to do.
Sometimes one player speaks for the whole party, saying, “We’ll take the east door,” for example. Other times, different adventurers do different things: one adventurer might search a treasure chest while a second examines an esoteric symbol engraved on a wall and a third keeps watch for monsters. The players don’t need to take turns, but the DM listens to every player and decides how to resolve those actions.
Sometimes, resolving a task is easy. If an adventurer wants to walk across a room and open a door, the DM might just say that the door opens and describe what lies beyond. But the door might be locked, the floor might hide a deadly trap, or some other circumstance might make it challenging for an adventurer to complete a task. In those cases, the DM decides what happens, often relying on the roll of a die to determine the results of an action.
As the player, you decide what you character does. If that means you wear your shield all the time, then you wear your shield all the time.
As far as sleeping with your shield on, realistically, adventurers probably don’t do that; so talk to your DM about that one. In my games, as a player, I don’t sleep with my shield, and as a DM, I assume my players don’t either. This really only matters if the party is ambushed while sleeping. When this happens, it can help raise the stakes a bit on that first round, as shield users are forced to decide between their shield AC bonus and using their action for something else.