It depends on where in Tibet you want to go. But suppose you want to visit Lhasa.
There is no direct flight from Narita to Lhasa. So you have to take a flight to Chengdu first. Then you can take another flight from Chengdu to Lhasa.
Altitude medicine is 高山病予防薬 kouzanbyou yobouyaku in Japanese.
In Japan, you cannot get it without a prescription of a doctor. You have to consult doctor first. As to how much to take and how often, ask your doctor.