In November 2003, when Hirayama was 18 years old, he was selected the Japan U-20 national team for 2003 World Youth Championship. He played 4 matches and scored 2 goals. In 2004, he was selected for the Japan U-23 national team for 2008 Summer Olympics and played one game. In 2005, he played for U-20 Japan at 2005 World Youth Championship again. He played all 4 matches and score one goal. In January 2010, he was selected the Japan national team for 2011 Asian Cup qualification. At this qualification, he debuted against Yemen on January 6. He scored a hat trick to help Japan to a 3–2 victory. It was the first time in 80 years and the second time overall for a Japan player to score three goals on his debut. Takeo Wakabayashi last managed that in 1930. He played 4 games and scored 3 goals for Japan in 2010.