Headaches result from changes in the system that affects the cerebral arteries
The weaker side of the brain will accept septic material and the migraine headache will be accompanied by pulsation in the arteries. The pain could be relieved in this case when one ties a bandage so that the pulsing of the arteries is stopped and thus the pain is lessened.
Abu Na'im said in his book on Prophetic medicine that the migraine type of headache used to attack the Prophet ss and that it would prevent him from going out of his house for one or two days at a time. In addition, Abu Na'im related from Ibn Ab'ass that he said, "Once, the Messenger of Allah ;ig delivered a speech while a cloth was tied around his head."
In addition, the Sahih states that the Prophet * said
during the illness that preceded his death: "O my head!" He used to tie a piece of cloth around his head.
Tying a piece of cloth around the head helps soothe the pain of headaches and migraines.