Xanax and insomnia.

There are lots of medications used for insomnia but I suspect that all require prescriptions in Japan and some may not be available in Japan. Xanax or alprazolam is an antianxiety drug which works for some people but its half life is only 2-4 hours so you might wake up and need another dosage. A better choice might be an intermediate lasting benzodiazepine such as lorazepam or Ativan which last 6-8 hours. Again neither of these are hypnotics but rather sedatives.Ambien (generic zolpidem), Lunesta (eszopicione), Sonata (zalepion) and some others (Dalmane, Restoral, ProSom) are all hypnotics but I suspect that all require a prescription as in the US they are all controlled substances as they are habit forming with a potential for abuse. You might want to read about melatonin and using that to try to reset your sleep cycle. You start before you leave.