How can you avoid restless leg syndrome?

Avoid triggers. If you have rls, avoid triggers both medically and medications. Avoid stimulants (nicotine, caffeine, etc) and if you have medical condition that makes it worse - treat it (i.e. Iron deficiency, thyroid problems, vit b/folate deficiencies).
Not so easy. Rls is acquired by many, and can be associated with anemias, kidney disease, peripheral nerve problems, multiple sclerosis, and iron metabolism issues (ferritin). If it does occur, medication is available and works very well, especially, the Neupro (rotigotine) patch.