The role of vitamin D in osteomineral metabolism is well known. Several studies have suggested its action on different biological mechanisms, such as nociceptive sensitivity and sleep–wake cycle modulation. Sleep is an important biological process regulated by different regions of the central nervous system, mainly the hypothalamus, in combination with several neurotransmitters. Pain, which can be classified as nociceptive, neuropathic and psychological, is regulated by both the central and peripheral nervous systems. In the peripheral nervous system, the immune system participates in the inflammatory process that contributes to hyperalgesia. Sleep deprivation is an important condition related to hyperalgesia, and recently it has also been associated with vitamin D. Poor sleep efficiency and sleep disorders have been shown to have an important role in hyperalgesia, and be associated with different vitamin D values. Vitamin D has been inversely correlated with painful manifestations, such as fibromyalgia and rheumatic diseases. Studies have demonstrated a possible action of vitamin D in the regulatory mechanisms of both sleep and pain. The supplementation of vitamin D associated with good sleep hygiene may have a therapeutic role, not only in sleep disorders but also in the prevention and treatment of chronic pain conditions.