The 24-year-old striker spent the latter half of last season on loan at Bolton and made a permanent move in the last transfer window.
Afolayan scored a goal in his only senior West Ham appearance last season when he came on as a substitute against Doncaster Rovers in an FA Cup clash.
But David Moyes did not give him any more opportunities and the forward admitted that it was clear this year that he needed to move on from West Ham in order to play regular first-team football.
He joined Bolton on an initial loan in January and he conceded that the move was straightforward as manager Ian Evatt explained his role in the team and he was convinced about joining the League One club.
“I’m a realistic person and having been at the club for three years and not being as close to the first team as I needed to be, I came to a point in my head where I knew I had to look elsewhere to get first-team football”, Afolayan told The Athletic.
“Towards the end of the window, it became clear to me that Bolton were interested.
“Once I heard that I said to my dad and my agent that it would be good to get something sorted.
“The manager, Ian Evatt, phoned and said where he wanted me to play and his vision for the club.
“It was pretty much straightforward from there.”
Afolayan has made his mark in League One and has already netted four times in seven appearances for Bolton this season.