Delirium. It is not just old people, although they are at higher risk. Patients with critical illness commonly have delirium, this is a brain malfunction which can range from confusion/agitation to coma. In the ICU there are multiple causes. These include toxins that can be present from impaired organ function in the ICU , (like kidney failure) , side effect of needed drugs, or consequence of infections.
Multiple factors . This is called ICU psychosis or is sometimes called sun downing. In the ICU patient are often very sick , combined with lack of sleep due to their condition and treatment result in the confusion that is seen in the icu. As patient recover and are transitioned to a regular room or home they usually will return to their baseline.