The 19-year-ol joined Rovers in August, but he made just two starts in four outings at Ewood Park.
He scored for the Hammers against Rovers in Premier League Two on Monday.
Boss Owen Coyle told the Rovers website: “Martin’s family felt that he wanted to be starting games and at this moment in time we couldn’t guarantee him that.
“So we agreed that it was in his best interest to return to West Ham. He’s a great lad and we wish him well.”