Sleep abnormalities are often a prominent contributor to withdrawal symptoms following chronic drug use. Notably, rapid eye movement (REM) sleep regulates emotional memory, and persistent REM sleep impairment after cocaine withdrawal negatively impacts relapse-like behaviors in rats. However, it is not understood how cocaine experience may alter REM sleep regulatory machinery, and what may serve to improve REM sleep after withdrawal. Here, we focus on the melanin-concentrating hormone (MCH) neurons in the lateral hypothalamus (LH), which regulate REM sleep initiation and maintenance. Using adult male Sprague Dawley rats trained to self-administer intravenous cocaine, we did transcriptome profiling of LH MCH neurons after long-term withdrawal using RNA-sequencing, and performed functional assessment using slice electrophysiology. We found that three weeks after withdrawal from cocaine, LH MCH neurons exhibit a wide range of gene expression changes tapping into cell membrane signaling, intracellular signaling, and transcriptional regulations. Functionally, they show reduced membrane excitability and decreased glutamatergic receptor activity, consistent with increased expression of voltage-gated potassium channel gene Kcna1 and decreased expression of metabotropic glutamate receptor gene Grm5. Finally, chemogenetic or optogenetic stimulations of LH MCH neural activity increase REM sleep after long-term withdrawal with important differences. Whereas chemogenetic stimulation promotes both wakefulness and REM sleep, optogenetic stimulation of these neurons in sleep selectively promotes REM sleep. In summary, cocaine exposure persistently alters gene expression profiles and electrophysiological properties of LH MCH neurons. Counteracting cocaine-induced hypoactivity of these neurons selectively in sleep enhances REM sleep quality and quantity after long-term withdrawal.