If you are having a bad headache while taking any kind of herbal to rid yourself of worms, it is the dying worms that is causing the headache. As they die, toxins are being released. That is why you need to drink plenty of water and take lots of magnesium to aid in flushing them out of your body.