The 20-year-old best friend of Liam Anderson was in a drug-induced psychosis when he beat the son of Australian rock legend Gary "Angry" Anderson to death in Sydney's northern beaches on Sunday, it is alleged.

Mathew Flame had been using drugs, believed to be MDMA, when he attacked 26-year-old Liam in Pavilion Reserve at Queenscliff about 6am on Sunday, a source has claimed to the Herald.

He was charged with murder just after 2pm on Monday.

Liam Anderson. Credit:Facebook

It is further understood the 20-year-old plumbing apprentice only became aware of the violent incident when he woke from the alleged psychosis after being taken to hospital.