First, to treat the underlying cause, if any. This includes stopping any medications that can trigger RLS/PLMS, if possible.
It is important to maintain good sleep hygiene, quit smoking and exercise regularly during the day.
The drug treatment includes: dopamine agonists, alfa-2 delta ligands (gabapentin, pregabalin) and opioids.