Click the bed and choose Sleep. Make sure the path is clear so your Sim can reach it. If they cannot enter, move objects blocking the way.