Shadow does rest, though the games never really dwell on it. He isn't shown sleeping often, and his exact habits are left ambiguous, so there's no clear canonical answer beyond the assumption that, like anyone, he needs to recharge now and then.