Certain medications used to treat painful nerve conditions and epilepsy, such as gabapentin, also may effectively treat RLS. Other prescription drugs, including opioid analgesics, muscle relaxants and sleep medications, are sometimes used to help combat RLS symptoms as well.