Hi Kheng Siong,
There are numerous reasons that can cause insomnia. For example, a blocked airway due to allergies, heartburn from indigestion, painful medical conditions such as arthritis, premenopausal symptoms, or psychological disorders such as depression and anxiety.
So we come back to the concept of syndromes classification (辨证型), in which insomnia is divided into five syndromes. The physician you consulted most probably diagnosed each of you under a different syndrome, hence, two completely different prescriptions.
Also read: The Complete Guide to Seeing a TCM Physician in Singapore (2021)