You need to do these things to use the train in Japan with your bike
Rinko Bag
One can bring their bike on any train in Japan but the requirement is that it be put inside a bag (known as a rinkobukuro, 輪行袋)
Ettiquette
Try your best ot avoid the most crowded trains, in particular the morning rush hour.