You are a helpful, respectful, and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
What is Parasomnia and explain in detail?
Parasomnias  are a category of sleep disorders that involve abnormal movements, behaviors, emotions, perceptions, and dreams that occur while falling asleep, sleeping, between sleep stages, or during arousal from sleep. Parasomnias are dissociated sleep states which are partial arousals during the transitions between wakefulness, NREM sleep, and REM sleep, and their combinations.

Classification
The newest version of the International Classification of Sleep Disorders (ICSD, 3rd. Ed.) uses State Dissociation as the paradigm for parasomnias. Unlike before, where wakefulness, non-rapid eye movement (NREM) sleep, and rapid eye movement (REM) sleep were considered exclusive states, research has shown that combinations of these states are possible and thus, may result in unusual unstable states that could eventually manifest as parasomnias or as altered levels of awareness.Although the previous definition is technically correct, it contains flaws. The consideration of the State Dissociation paradigm facilitates the understanding of the sleep disorder and provides a classification of 10 core categories.

Non-rapid eye movement (NREM)-related parasomnias
NREM parasomnias are arousal disorders that occur during stage 3 (or 4 by the R&K standardization) of NREM sleep—also known as slow wave sleep (SWS). They are caused by a physiological activation in which the patients brain exits from SWS and is caught in between a sleeping and waking state. In particular, these disorders involve activation of the autonomic nervous system, motor system, or cognitive processes during sleep or sleep-wake transitions.Some NREM parasomnias (sleep-walking, night-terrors, and confusional arousal) are common during childhood but decrease in frequency with increasing age. They can be triggered in certain individuals, by alcohol, sleep deprivation, physical activity, emotional stress, depression, medications, or a fevered illness. These disorders of arousal can range from confusional arousals, somnambulism, to night terrors. Other specific disorders include sleepeating, sleep sex, teeth grinding, rhythmic movement disorder, restless legs syndrome, and somniloquy.

Differential diagnosis for NREM-related parasomnias
Sleep-disordered breathing
REM-related parasomnias
Nocturnal seizures
Psychogenic dissociative disorders

Confusional arousals
Confusional arousal is a condition when an individual awakens from sleep and remains in a confused state. It is characterized by the individuals partial awakening and sitting up to look around. They usually remain in bed and then return to sleep. These episodes last anywhere from seconds to minutes and may not be reactive to stimuli. Confusional arousal is more common in children than in adults. It has a lifetime prevalence of 18.5% in children and a lifetime prevalence of 2.9–4.2% in adults. Infants and toddlers usually experience confusional arousals beginning with large amounts of movement and moaning, which can later progress to occasional thrashings or inconsolable crying. In rare cases, confusional arousals can cause injuries and drowsy driving accidents, thus it can also be considered dangerous. Another sleeping disorder may be present triggering these incomplete arousals.

Somniloquy (sleep talking)
A form of parasomnia where a person will speak during their dreams.

Sleep-related abnormal sexual behavior
Sleep-related abnormal sexual behavior, Sleep sex, or sexsomnia, is a form of confusional arousal that may overlap with somnambulism. Thereby, a person will engage in sexual acts while still asleep. It can include such acts as masturbation, inappropriate fondling themselves or others, having sex with another person; and in more extreme cases, sexual assault. These behaviors are unconscious, occur frequently without dreaming, and bring along clinical, social, and legal implications. It has a lifetime prevalence of 7.1% and an annual prevalence of 2.7%.

Sleepwalking (somnambulism)
Sleepwalking has a prevalence of 1–17% in childhood, with the most frequent occurrences around the age of eleven to twelve. About 4% of adults experience somnambulism.
Normal sleep cycles include states varying from drowsiness all the way to deep sleep. Every time an individual sleeps, he or she goes through various sequences of non-REM and REM sleep. Anxiety and fatigue are often connected with sleepwalking. For adults, alcohol, sedatives, medications, medical conditions and mental disorders are all associated with sleepwalking. Sleep walking may involve sitting up and looking awake when the individual is actually asleep, and getting up and walking around, moving items or undressing themselves. They will also be confused when waking up or opening their eyes during sleep. Sleep walking can be associated with sleeptalking.

Sleep terrors (night terrors/ pavor nocturnus)
Sleep terror is the most disruptive arousal disorder since it may involve loud screams and panic; in extreme cases, it may result in bodily harm or property damage by running about or hitting walls. All attempts to console the individual are futile and may prolong or intensify their confused state. Usually they experience amnesia after the event but it may not be complete amnesia. Up to 3% of adults have sleep terrors and exhibited behavior of this parasomnia can range from mild to extremely violent. This is very prevalent in those who have violent post-traumatic stress disorder (PTSD). They typically occur in stage 3 sleep.

Sleep-related eating disorder (SRED)
The Diagnostic and Statistical Manual of Mental Disorders (DSM-V) classifies sleep-related eating disorder under sleepwalking, while ICSD classifies it as NREM-related parasomnia. It is conceptualized as a mixture of binge-eating behavior and arousal disorder. Thereby, preferentially high-caloric food is consumed in an uncontrolled manner. However, SRED should not be confused with nocturnal eating syndrome, which is characterized by an excessive consumption of food before or during sleep in full consciousness. Since sleep-related eating disorders are associated with other sleep disorders, successful treatment of the latter can reduce symptoms of this parasomnia.

Rapid eye movement (REM)-related parasomnias
REM sleep behavior disorder
Unlike other parasomnias, rapid eye movement sleep behavior disorder (RBD) in which muscle atonia is absent is most common in older adults. This allows the individual to act out their dreams and may result in repeated injury—bruises, lacerations, and fractures—to themselves or others. Patients may take self-protection measures by tethering themselves to bed, using pillow barricades, or sleeping in an empty room on a mattress. Besides ensuring the sleep environment is a safe place, pharmacologic therapy using melatonin and clonazepam is also common as a treatment for RBD, even though they might not eliminate all abnormal behaviours. Before starting a treatment with clonazepam, a screening for obstructive sleep apnea should performed. However, clonazepam needs to be manipulated carefully because of its significant side effects, i.e., morning confusion or memory impairment, mainly in patients with neurodegenerative disorders with dementia.Demographically, 90% of RBD patients are males, and most are older than 50 years of age. However, this prevalence in males could be biased due to the fact that women tends to have a less violent type of RBD, which leads to lower reports at sleep centres and different clinical characteristics. While men might have more aggressive behaviour during dreaming, women have presented more disturbance in their sleep. RBD may be also influenced by a genetic compound, since primary relatives seem to have significantly more chance to develop RBD compared with non-relatives control group.Typical clinical features of REM sleep behavior disorder are:

Male gender predilection
Mean age of onset 50–65 years (range 20–80 years)
Vocalisation, screaming, swearing that may be associated with dreams
Motor activity, simple or complex, that may result in injury to patient or bed-partner
Occurrence usually in latter half of sleep period (REM sleep)
May be associated with neurodegenerative disease Acute RBD occurs mostly as a result of a side-effect in prescribed medication—usually antidepressants. Furthermore, substance abuse or withdrawal can result in RBD.Chronic RBD is idiopathic, meaning of unknown origin, or associated with neurological disorders. There is a growing association of chronic RBD with neurodegenerative disorders—Parkinsons disease, multiple system atrophy (MSA), or dementia—as an early indicator of these conditions by as much as 10 years. RBD associated with neurological disorders is frequently related to abnormal accumulation of alpha-synuclein, and more than 80% of patients with idiopathic RBD might develop Lewy body disease (LBD). Patients with narcolepsy are also more likely to develop RBD.
The diagnosis is based on clinical history, including partners account and needs to be confirmed by polysomnography (PSG), mainly for its accuracy in differentiating RBD from other sleep disorders, since there is a loss of REM atonia with excessive muscle tone. However, screening questionnaires, such as RBDSQ, are also very useful for diagnosing RBD.

Recurrent isolated sleep paralysis
Recurrent isolated sleep paralysis is an inability to perform voluntary movements at sleep onset, or upon waking from sleep. Although the affected individual is conscious and recall is present, the person is not able to speak or move.  However, respiration remains unimpaired. The episodes last seconds to minutes and diminish spontaneously. The lifetime prevalence is 7%. Sleep paralysis is associated with sleep-related hallucinations. Predisposing factors for the development of recurrent isolated sleep paralysis are sleep deprivation, an irregular sleep-wake cycle, e.g. caused by shift work, or stress. A possible cause could be the prolongation of REM sleep muscle atonia upon awakening.

Nightmare disorder
Nightmares are like dreams primarily associated with REM sleep. Nightmare disorder is defined as recurrent nightmares associated with awakening dysphoria that impairs sleep or daytime functioning. It is rare in children, however persists until adulthood. About 2/3 of the adult population report experiencing nightmares at least once in their life.

Catathrenia
Before the ICSD-3, Catathrenia was classified as a rapid-eye-movement sleep parasomnia, but is now classified as sleep-related breathing disorder. It consists of breath holding and expiratory groaning during sleep, is distinct from both somniloquy and obstructive sleep apnea. The sound is produced during exhalation as opposed to snoring which occurs during inhalation. It is usually not noticed by the person producing the sound but can be extremely disturbing to sleep partners, although once aware of it, they tend to be woken up by their own groaning as well.  Bed partners generally report hearing the person take a deep breath, hold it, then slowly exhale; often with a high-pitched squeak or groaning sound.

Sleep-Related painful erections
Painful erections appear only during the sleep. This condition is present during the REM sleep. Sexual activity does not produce any pain. There is not any lesion or physical damage but an hypertonia of the pelvic floor could be one cause. It affects men of all ages but especially from the middle-age. Some pharmacologic treatment as propranolol, clozapine, clonazepam, baclofen and various antidepressants, seems to be effective.

Other parasomnias
Exploding head syndrome
Sleep-related hallucinations
Sleep-related hallucinations are brief episodes of dream-like imagery that can be of any sensory modality, i.e., auditory, visual, or tactile. They are differentiated between hypnagogic hallucination, that occur at sleep onset, and hypnapompic hallucinations, which occur at the transition of sleep to awakening. Although normal individuals have reported nocturnal hallucinations, they are more frequent in comorbidity with other sleep disorders, e.g. narcolepsy.

Sleep enuresis
Parasomnias due to medical disorder
Parasomnias due to medication or substance
Parasomnia, unspecific
Sleep drunkenness, also known as confusional arousal, is the feeling of confusion or sudden action upon waking up from deep sleep. Severe sleep inertia, one cause of oversleeping, is considered to develop sleep drunkenness.

Isolated symptom/normal variant
Sleep talking (somniloquy)
According to ICSD-3 it is not defined a disorder in particular. It is rather an isolated symptom or normal variant and ranges from isolated speech to full conversations without recall. With a lifetime prevalence of 69% it is considered fairly common. Sleep talking is associated with REM-related parasomnias as well as with disorders or arousal. It occurs in all sleep states. As yet, there is no specific treatment for sleeptalking available.

Diagnosis
Parasomnias are most commonly diagnosed by means of questionnaires. These questionnaires include a detailed analyses of the clinical history and contain questions to:

Rule out sleep deprivation
Rule out effects of intoxication or withdrawal
Rule out sleep disorders causing sleep instability
Rule out medical disorders or treatments associated with sleep instability
Confirm presence of NREM parasomnias in other family members and during the patients childhood
Determine the timing of the events
Determine the morphology of the events.Furthermore, a sleep diary is helpful to exclude that sleep deprivation could be a precipitating factor. An additional tool could be the partners log of the events. The following questions should therefore be considered:

Do you or your bed partner believe that you move your arms, legs, or body too much, or have unusual behaviors during sleep?
Do you move while dreaming, as if you are simultaneously attempting to carry out the dream? l Have you ever hurt yourself or your bed partner during sleep?
Do you sleepwalk or have sleep terrors with loud screaming?
Do your legs feel restless or begin to twitch a lot or jump around when you are drowsy or sleepy, either at bedtime or during the day?
Do you eat food or drink fluids without full awareness during the night? Do you wake up in the morning feeling bloated and with no desire to eat breakfast?In potentially harmful or disturbing cases a specialist in sleep disorders should be approached. Video polysomnographic documentation is necessary only in REM sleep behavior disorder (RBD), since it is an essential diagnostic criteria in the ICSD to demonstrate the absence of muscle atonia and to exclude comorbid sleep disorders. For most of the other parasomnias, polysomnographic monitoring is a costly, but still supportive tool in the clinical diagnosis.The use of actigraphy can be promising in the diagnostical assessment of NREM-related parasomnias, for example to rule out sleep deprivation or other sleep disorders, like circadian sleep-wake rhythm disorder which often develops among shift workers. However, there is currently no generally accepted standardized technique available of identifying and quantifying periodic limb movements in sleep (PLMS) that distinguishes movements resulting from parasomnias, nocturnal seizures, and other dyskinesias. Eventually, using actigraphy for parasomnias in general is disputed.

Treatment
Parasomnias can be considered as potentially harmful to oneself as well as to bed partners, and are associated with other disorders. Children with parasomnias do not undergo medical intervention, because they tend to recover the NREM-related disorder with the process of growth. In those cases, the parents receive education on sleep hygiene to reduce and eventually eliminate precipitating factors.In adults psychoeducation about a proper sleep hygiene can reduce the risk to develop parasomnia. Case studies have shown that pharmacological interventions can improve symptoms of parasomnia, however mostly they are accompanied by side-effects. Behavioral treatments, i.e., relaxation therapy, biofeedback, hypnosis, and stress reduction, may also be helpful, but are not considered as universally effective.

Prognosis
NREM-related parasomnias which are common in childhood show a good prognosis, since severity decreases with age, the symptoms tend to resolve during puberty. Adults with NREM-related parasomnias, however, are faced with a stronger persistence of the symptoms, therefore, full remission is quite unlikely and is also associated with violent complications, including homicide. The variant sleep-related eating disorders is chronic, without remission, but treatable.REM sleep behavior disorder (RBD) can mostly be handled well with the use of melatonin or clonazepam. However, there is high comorbidity with neurodegenerative disorders, that is in up to 93% of cases