I have actually never heard of costmary before today but I did some research online and only found one real reference for it helping with headaches or stomach ailments. Here is the reference:
It is under the dominion of Jupiter. It is astringent to the stomach, and strengtheneth the liver, and...