Where are the raphe nuclei?
The term "raphe" refers to a line or ridge that separates two symmetrical parts of the body, and was used in the naming of the raphe nuclei because this collection of nuclei are clustered around the midline of the brainstem. The raphe nuclei are composed of a number of nuclei that are found at most levels of the brainstem from the midbrain down to the spinal cord. They are considered part of the reticular formation.
What are the raphe nuclei and what do they do?
The raphe nuclei are the primary location in the brain for the production of the neurotransmitter serotonin, and the serotonin synthesized in the raphe nuclei is then sent throughout the entire central nervous system. Although the raphe nuclei represent the largest collection of serotonin neurons in the brain, it should be noted that the raphe nuclei don't only consist of serotonin neurons. In fact, the proportion of serotonin neurons in the raphe nuclei varies substantially depending on the nucleus in question, ranging from 10-20% to 80%. Thus, neurons that utilize other neurotransmitters contribute significantly to the makeup of the raphe nuclei.
The nuclei of the rostral group contain about 85% of all of the serotonin neurons in the brain. The rostral group includes the following nuclei: the caudal linear nucleus, dorsal raphe nucleus---which is the largest population of serotonin neurons in the brain---and the median raphe nucleus.
The caudal group represents a substantially smaller collection of serotonin neurons than the rostral group. It consists of the: raphe magnus nucleus, raphe obscurus nucleus, and raphe pallidus nucleus. The raphe pallidus nucleus is the smallest of the raphe nuclei.
The projections from the raphe nuclei are pervasive, carrying serotonin throughout the central nervous system. Thus, the functions that can be linked back to the raphe nuclei are also extensive and complex. There are, however, several functions that have a recognized association with activity in the raphe nuclei. Although, as mentioned above, there are non-serotonin neurons found in the raphe nuclei, their contribution to behavior has been studied much less comprehensively than the contribution of the serotonin neurons from the raphe nuclei.
Serotonin neurons that extend from the dorsal raphe nucleus to other nuclei in the brainstem are thought to be important to the regulation of sleep-wake cycles. These neurons are highly active during wakefulness, but are less active during sleep---and almost completely inactive during REM sleep. Activity in the dorsal raphe and the median raphe is also believed to influence circadian rhythms through communication with the suprachiasmatic nucleus.
The raphe nuclei (specifically the raphe magnus and dorsal raphe) are also involved in the natural inhibition of pain. Neurons from the raphe nuclei extend down to the spinal cord, where they inhibit neurons in the dorsal horn of the spinal cord that are responsible for transmitting pain signals. This allows for some control over the intensity of pain. You can read more about this natural pain-inhibiting mechanism here.
There is also a great deal of evidence suggesting that serotonin is involved (either directly or indirectly) in the regulation of mood and other emotional states. For example, drugs that manipulate serotonin levels (e.g. selective serotonin reuptake inhibitors, or SSRIs) are the most common treatment for depression and are also used to treat various types of anxiety disorders. Additionally, there is evidence linking serotonin to the regulation of aggressive behavior. The true relationship between serotonin and mood (ranging from depression to aggression), however, is still unclear and often controversial (this is perhaps exemplified by the debate about serotonin's true role in depression, described in this article).
Of course, serotonin's actions in the brain are much more extensive then just the few listed here, and serotonin has been implicated in a long list of functions ranging from motor activity to neural development. Serotonin, like other neurotransmitters, is critical to healthy brain function, making the raphe nuclei important structures in the central nervous system.
References (in addition to linked text above):
Hornung, JP. Raphe Nuclei. In: Mai JK and Paxinos G, eds. The Human Nervous System. 3rd ed. New York: Elsevier; 2012.