Chris O'Dowd plays Irish journalist David Walsh, who spent 13 years uncovering Armstrong's dependence on steroids, in The Program.
Foster revealed last week he had followed Armstong's doping programme, to better understand the role.
"I think that's a really smart thing and makes sense," O'Dowd told the BBC.
"With something like that you know it's not going to harm you necessarily, and you're going to have to perform so much [while filming]," he said.
The former IT Crowd star said he believed actors would struggle to portray the effects of drug use if they had not taken the substances themselves.
"I think if you have to take drugs in a role, it's very hard to do without taking the drug at some stage in your life," he said.
"I'm not advocating that you [should take drugs for a role], but I'm sure it probably wouldn't hurt your performance. It might hurt you as a human being, but it would be silly to say that would not be a good way in to knowing [what it's like].
"That's not to say you should, or you shouldn't, but you can understand the validity of it."
Although banned in sport, performance enhancing drugs - which can aid oxygen delivery - are not illegal and can be prescribed for conditions such as anaemia.
Foster, who trained with professional cyclists for his role and spent many hours cycling on stretches of the Tour de France route, underwent the doping programme under the supervision of a doctor.
However he did not tell British director Frears or his fellow cast members during filming. Many of them only found out days before the film's premiere at the Toronto International Film Festival.
Frears seemed unfazed by the news, however, telling reporters: "He's still alive."
"It happened. There's nothing I can do about it. I can't turn the clock back. The truth is, he's so good in the film, and I'm so grateful to him for being that good.
"I'm not interested in the process by which people arrive at their performances. I just expect them to turn up on the first day and be brilliant."
The Program will be released in UK cinemas on 16 October.
Actor Ben Foster was "really smart" to take performance enhancing drugs while filming a biopic of Lance Armstrong, his co-star says