In medicine, hypoventilation (also known as respiratory depression) occurs when ventilation is inadequate (hypo means "below") to perform needed gas exchange. By definition it causes an increased concentration of carbon dioxide (hypercapnia) and respiratory acidosis.
As a side effect of medicines or recreational drugs, hypoventilation may become potentially life-threatening. Many different CNS depressant drugs such as alcohol, benzodiazepines, barbiturates, GHB, sedatives and opiates produce respiratory depression when taken in large or excessive doses; however this is most commonly seen as a cause of death with opiates or opioids, particularly when they are combined with sedatives such as alcohol or benzodiazepines. Strong opiates, (fentanyl, heroin, morphine, etc.), barbiturates, and the benzodiazepine, temazepam, are notorious for producing this effect; in an overdose, an individual may cease breathing entirely (go into respiratory arrest) which is rapidly fatal without treatment.
Respiratory stimulants such as nikethamide were traditionally used to counteract respiratory depression from CNS depressant overdose, but were of only limited effectiveness. A new respiratory stimulant drug BIMU8 is currently being investigated which seems to be significantly more effective and may be useful for counteracting the respiratory depression produced by opiates and similar drugs without offsetting their therapeutic effects.
If the respiratory depression is from opioid overdose, then the overdose itself is usually treated with an inverse agonist, most likely naloxone, which will itself almost instantaneously stop the respiratory depression if caused by an opioid (and also, depending on the dose, plunge the patient into precipitated withdrawal).
Associated conditions 
Disorders referred to as "Congenital Central Hypoventilation Syndrome" or "CCHS" and "Rapid-Onset Obesity, Hypothalamic Dysfunction, Hypoventilation, with Autonomic Dysregulation" or ROHHAD are recognized. CCHS condition may be a significant factor in some cases of sudden infant death syndrome or SIDS, often termed "cot death" or "crib death."
See also