Increased vigilance in settings of potential threats or in states of vulnerability related to pain is important for survival. Pain disrupts sleep and conversely, sleep disruption enhances pain, but the underlying mechanisms remain unknown. Chronic pain engages brain stress circuits and increases secretion of dynorphin, an endogenous ligand of the kappa opioid receptor (KOR). We therefore hypothesized that hypothalamic dynorphin/KOR signaling may be a previously unknown mechanism that is recruited in pathological conditions requiring increased vigilance. We investigated the role of KOR in wakefulness, non-rapid eye movement (NREM) sleep and rapid eye movement (REM) sleep in freely moving naïve mice and in mice with neuropathic pain induced by partial sciatic nerve ligation (PSNL) using EEG/EMG recordings. Systemic continuous administration of U69,593, a KOR agonist, over 5 days through an osmotic minipump decreased the amount of NREM and REM sleep and increased sleep fragmentation in naive mice throughout the light-dark sleep cycle. We used KORcre mice to selectively express a Gi-coupled designer receptor activated by designer drugs (Gi-DREADD) in KORcre neurons of the hypothalamic paraventricular nucleus (PVN), a key node of the hypothalamic-pituitary-adrenal (HPA) stress response. Sustained activation of Gi-DREADD with clozapine-N-oxide (CNO) delivered in drinking water over 4 days disrupted sleep in these mice in a similar way as systemic U69,593. Mice with chronic neuropathic pain also showed disrupted NREM and total sleep that was normalized by systemic administration of two structurally different KOR antagonists, norbinaltorphimine (nor-BNI) and NMRA-140, currently in phase II clinical development, or by CRISPR/Cas9 editing of PVN KOR, consistent with endogenous KOR activation disrupting sleep in chronic pain. Unexpectedly, REM sleep was diminished by either systemic KOR antagonist or by CRISPR/Cas9 editing of PVN KOR in sham-operated mice. Our findings reveal previously unknown physiological and pathophysiological roles of dynorphin/KOR in eliciting arousal. Physiologically, dynorphin/KOR signaling affects transitions between sleep stages that promote REM sleep. Furthermore, while KOR antagonists do not promote somnolence in the absence of pain, they normalized disrupted sleep in chronic pain, revealing a pathophysiological role of KOR signaling that is selectively recruited to promote vigilance, increasing chances of survival. Notably, while this mechanism is likely beneficial in the short-term, disruption of the homeostatic need for sleep over longer periods may become maladaptive resulting in sustained pain chronicity. A novel approach for treatment of chronic pain may thus result from normalization of chronic pain-related sleep disruption by KOR antagonism.