Everything that is discharged through one's private parts, whether wind, fluid or solid, invalidates ablution. It is well known that a discharge of semen requires a full bath or grand ablution. But everything else that is discharged through either private parts requires a fresh ablution, i.e. wudhu before one can offer prayers. Sound sleep is also a cause to invalidate ablution. Some scholars are of the opinion that a mere sleep is sufficient cause to require a new ablution, while the majority of scholars suggest that if a person sleeps while seated in a position which makes any release of wind impossible, his ablution is not invalidated.
Loss of consciousness is another reason for fresh ablution before prayer.
It does not matter whether this is caused by drunkenness, medicine, or by natural causes. Similarly, a temporary loss of mental powers through madness is also a cause which invalidates ablution. There are Hadiths to support what we have said regarding each of these causes. Limitation of space prevents me from quoting them in detail. They are readily available in any book of Fiqh or Hadith.