Fugue, and fugue-like state, are used to refer to a syndrome characterized by loss of personal memory (hence the alternative name of "twilight state"), automatic and sometimes repetitive behaviors, and wandering or driving away from normal surroundings.
Fugue may be:
Psychogenic: associated with depression (sometimes with suicide); alcoholism, amnesia; "hysteria";
Epileptic: complex partial seizures Narcoleptic
Some patients with frontotemporal dementia may spend the day walking long distances, and may be found a long way from home, unable to give an account of themselves, and aggressive if challenged; generally they are able to find their way home (spared topographical memory) despite their other cognitive deficits.