There is nothing that you can do to prevent developing polymyositis and dermatomyositis.