The Japanese authorities have zero tolerance for drug use - so my advice to you is don't do drugs in Japan.
Indeed, medications that are readily available over the counter (without a prescription) in countries like the USA or the UK, might contain substances that are banned altogether in Japan.
It you take medication on a regular basis it is best to check in advance of travel to see if anything you need to take with you conflicts with Japanese laws.
A history of taking action
In 1980 Paul McCartney arrived at Narita International Airport, was arrested for cannabis possession, and was deported immediately. He was not able to enter Japan for the next ten years.
In 2010 Paris Hilton arrived at Narita International Airport and was refused entry into Japan due to a past drug case. She stayed overnight in the airport and returned to America the next day.
The lesson here is simple: don't do drugs in Japan.
If you're in any doubt about what medicines can be brought into Japan for personal use, you should consult the Japanese governments official guidance on this on the Ministry or Health, Labour and Welfare website.
Before visiting Japan, it’s helpful to learn a little about the culture. This will make your trip more enjoyable and respectful. See Top 7 Etiquette Tips For Travel in Japan for some of the essentials.
Ministry of Health, Labour and Welfare website (official guidance on bringing medicines into Japan)