Also. as long as your in a sanctuary you are gaining rested XP. It does not matter if you are logged in or off or sleeping in an inn.