Probably not for the reason you’re thinking — that it could be dangerous to have a hot cup of coffee on your tray table when unexpected turbulence strikes. And no, this isn’t a kashrut issue.
It’s for a very different reason.
According to Business Insider, a flight attendant disclosed that aircraft employees will typically avoid drinking tap water of any kind while in flight. Tap water from airplanes were found to contain different types of bacteria such as coliform and E. coli according to an EPA sample. Ingesting contaminated water can be devastating for infants, elderly, and those with autoimmune deficiencies.
It’s probably best to go for the complimentary juices and sodas, if your flight offers any, and try to grab a cup of coffee at the terminal before takeoff if you are in dire need of caffeine.