A K-complex is an electroencephalography (EEG) waveform that occurs during stage 2 of NREM sleep. It is the "largest event in healthy human EEG". It consists of a brief negative high-voltage peak, usually greater than 100 µV, followed by a slower positive complex around 350 and 550 ms and at 900ms a final negative peak. K-complexes occur roughly every 1.0–1.7 minutes and are often followed by bursts of sleep spindles. They occur spontaneously but also occur in response to external stimuli such as sounds, touches on the skin and internal ones such as inspiratory interruptions. They are generated in widespread cortical locations though they tend to predominate over the frontal parts of the brain. They are more frequent in the first sleep cycles of sleep.
They have two proposed functions. First, suppressing cortical arousal in response to stimuli that the sleeping brain evaluates not to signal danger, and second, aiding sleep based memory consolidation.
They are created by the occurrence in widespread cortical areas of outward dendritic currents from the middle (III) to the upper (I) layers of the cerebral cortex. This is accompanied by a decrease in broadband EEG power including gamma wave activity. This produces "down-states" of neuronal silence in which neural network activity is reduced. The activity of K-complexes is transferred to the thalamus where it synchronizes the thalamocortical network during sleep, producing sleep oscillations such as spindles and delta waves. It has been observed that they are indeed identical in the "laminar distributions of transmembrane currents" to the slow waves of slow wave sleep.
K-complex have been suggested both to protect sleep and also to engage in information processing as they are both an essential part of the synchronization of NREM sleep while they also respond to both internal and external stimuli in a reactive manner.  This would be consistent with a function in suppressing cortical arousal in response to stimuli that the brain needs to initially process in regard to whether it is dangerous or not.
Another suggested function is aiding the activation homeostasis of synapses and memory consolidation. The activation thresholds of cortical synapses become raised during wakefulness as they process information, and so need to be adjusted back to preserve their signal-to noise ratio. The down-state provided by K-complexes does this by reducing the strengths of synaptic connections that occur when they are activated while an individual is awake. Further, the recovery from the down-state they induce allows that "cortical firing 'reboots' in a systematic order" so that memory engrams encoded during neuronal firing can be "repeatedly practiced and thus consolidated".
They are present in the sleep of 5 month old infants, and develop with age. Between 3 and 5 years of age a faster negative component appears and continues to increase until adolescence. Another change occurs in adults: before 30 years of age their frequency and amplitude is higher than in older people particularly those over 50 years of age. This parallels the decrease in other components of sleep such as sleep spindle density and delta power.
In individuals with idiopathic generalized epilepsy, K-complex induced synchronization can trigger spike-wave discharges. This tends to happen most between the shift between waking and NREM, and between NREM and REM sleep. In autosomal dominant nocturnal frontal lobe epilepsy, K-complex are almost invariably present at the start of seizures.
Individuals with restless legs syndrome have increased numbers of K-complexes and these are associated with (and often precede) leg movements. Dopamine enhancing drugs such as L-DOPA that reduce leg movements do not reduce the K-complex suggesting that they are primary and the leg movements secondary to them. Failure of such drugs to reduce K-complexes in spite of reducing the leg movements has been suggested to be why patients after such treatment still continue to complain of non-restorative sleep. Clonazepam is another treatment for RLS; like other benzodiazepines, it inhibits REM sleep by enhancing levels of GABA. This inhibition of REM sleep significantly decreases K-complex count, and unlike L-DOPA treatment, clonazepam studies report improvement in sleep restoration. Therefore, drugs that inhibit REM sleep also decrease K-complex count.
Obstructive sleep apnea syndrome is associated with inspiratory occlusions evoking fewer K-complexes during NREM sleep even though K-complex are evoked normally to auditory stimuli and such individuals react normally to respiratory interruptions when awake. This suggests a link between such sleep apnea and a sleep specific blunted cortical response to respiratory problems.