From Ryzom Wiki
Sleep is an affliction; a negative status effect that handicaps the target.
A creature under the effect of Sleep is unable to move or take any action while they are asleep. They also can't dodge or parry any physical attacks directed at them while asleep. However, if they take any damage at all while asleep, the Sleep effect will immediately end.
Sleep as spell
Players are able to inflict Sleep on a target using the Sleep spell from the Defensive Affliction Magic skill. This spell is first available at level 30 defensive magic. Like with all affliction spells, a link must be maintained to keep the target asleep.
Players can increase their chances of resisting a Sleep Affliction spell by wearing jewelry that raises their Forest resistance.
Enemies using Sleep
Since homin mages are capable of casting Sleep affliction spells, it may be used against you in PvP, though it's not very popular there. It may also be cast against you in PvE by bandits or tribes guards, who do not need to maintain a link to keep you asleep.
Kidinak have a special ability that allows them to cast Sleep spells by spraying clouds of sleeping gas. This is not technically a spell casting and does not require the Kidinak to maintain a link. But it is considered a magical effect and thus Forest resistance will help you resist it.