Hi welcome to Health care magic forum. It is called
tetany, usually happens due to defeciency of calcium,with the distal limb muscles, happened with the proximal muscles in your case, and defenitely related to caffine the CNS stimulant ingridient of the coffee and tea. This is my assumption, to confirm it i advise you to consult a physician.
Besides i advise you co follow some diet recommendations as avoid taking spices, chillies, junk foods, and oily foods. potato other tubers, fish, and other sea foods.
Take more of green leafy vegetables, pulses, sprouts, milk, egg, meat, fruits, juices, and dry fruits to increase the blood, general health, and resistance to fight infections. Wishing for a quick recovery and thanks for calling.