The AI will currently cast web on a random unit. Its true that web is probably more useful to be cast on a flying unit, and I could bias the AI to choose flying vs non-flying, but it is valid to cast web on a walking unit because web causes the unit to lose a turn.
What do you mean by sleeping?