If it did damage, then sleep was cancelled. I recommend making your own sleep that is based on a stun(storm bolt). Then trigger the conditions on which it can be removed(debuff abilities, physical attacks(not parasite), spell casts(damage spells only))