A pokemon under the Sleep status condition cannot attack unless it uses the moves Sleep Talk or Snore. A sleeping pokemon will wake up after 1-3 turns in Black and White, and 1-5 turn in all other games. Self induced sleep via Rest always lasts two turns.
In Generation One, sleeping pokemon cannot attack on the turn they wake up, but in Generations II through V, the pokemon can attack on the same turn in which they wake up.
Sleep is an uncommon status condition, but is very useful since it renders the opponent useless while it is sleeping. The Sleep Clause prevents two pokemon from being put to sleep at the same time in competitive battling.
Related ThreadsMy Pokemon Fell Asleep? - last post by @ Nov 21, 2014
How long are pokemon asleep before they dream? - last post by @ Jul 9, 2011
The wild mewtwo fell asleep! The wild mewtwo used shadow ball! - last post by @ Oct 10, 2010
Raikou fell asleep, The Wild Raikou fled... - last post @ Jul 25, 2012