Noxious stimuli and painful disorders interfere with sleep, but disturbances in sleep also contribute to the experience of pain.Chronic paroxysmal hemicrania and possibly cluster headaches are related to REM sleep. Whereas headache is associated with snoring and sleep apnea, morning headaches are not specific for any primary sleep disorder. Nevertheless, the management of the sleep disorder ameliorates both morning headache and migraine.Noxious stimuli administered into muscles during slow-wave sleep (SWS) result in decreases in delta and sigma but an increase in alpha and beta EEG frequencies during sleep. Noise stimuli that disrupt SWS result in unrefreshing sleep, diffuse musculoskeletal pain, tenderness, and fatigue in normal healthy subjects. Such symptoms accompany alpha EEG sleep patterns that often occur in patients with fibromyalgia. The alpha EEG patterns include phasic and tonic alpha EEG sleep as well as periodic K alpha EEG sleep or frequent periodic cyclical alternating pattern. Moreover, alpha EEG sleep, as well as sleep-related breathing disorder and periodic limb movement disorder, occur in some patients with fibromyalgia, rheumatoid arthritis and osteoarthritis. Depression and not alpha EEG sleep are features of somatoform pain disorder. Disturbances in sleep, pain behaviour and psychological distress influence return to work in workers who have suffered a soft tissue injury, e.g. low back pain. Patients with irritable bowel disorder have disturbed sleep and have increased REM sleep. In conclusion, there is a reciprocal relationship between sleep quality and pain. The recognition of disturbed or unrefreshing sleep influences the management of painful medical disorders.