For every 8 hours you spend in an inn/city, you get one bubble of rested experience. Rested experience accumulates at 50% outside of inns and cities, so it’d give half a bubble in 8 hours in such a case. There’s a maximum of 30 bubbles of rested experience you can get, accounting for 1.5 levels of rested XP before taking quests into account since they don’t take up any of the rested XP.