Drugs that can prevent or relieve migraine attacks are only effective for some people. Research is starting to untangle the reasons why.