Magnussen said the prescription drug was taken "to bond with these guys".
"In hindsight it was a ridiculous choice and ridiculous method ... but I don't feel it affected my performance," Magnussen said.
The revelations came a day after Swimming Australia (SA) created its integrity panel in the wake of two damning reviews released publicly on Tuesday.
One review, into culture and leadership, found a "toxic" culture cruelled Australia's swim team at last year's London Olympics.
Australian swimmers won just one gold, six silver and three bronze medals at the London Games, the lowest tally in the pool in two decades.
The nation also failed to produce an individual gold medallist for the first time since the 1976 Montreal Olympics.
The review cited incidents of "getting drunk, misuse of prescription drugs, breaching curfews, deceit, bullying" which were not addressed by team hierarchy.
A separate review, into swimming's governance and high performance program, identified shortcomings including a lack of clear national vision and poor accountability, transparency and communication.
It also found Swimming Australia's board was unable to deal with issues and made 35 recommendations to improve governance and the high performance program.