You shpuld not refrain from eating on the local trains. But when it comes to long distance train, you are allowed to eat at your seat. The rule of thumb is that if there is a table, you can eat your bento. If there is no atble, look around and see aif anyone is eating.