The comic hit out at the tech moguls during a speech at King's College London, slamming them for the environmental impacts of their platforms and claiming they have poisoned cultural discourse.
He said about the pair: "You and your children cannot breathe the air or swim in the waters of our culture without breathing in the toxic particulates and stinking effluvia that belch and pour unchecked from their companies."
Stephen, once a prolific user of X, stopped posting in 2022 after Musk's acquisition of the platform.
Even though he has kept his account, he is no longer active on any social media.
He added in a reference to the so-called Arab Spring that saw social media being upheld as an example of its power for positive change: "I’m the chump who thought social media could change the world."
But he admitted he had since been "proved wrong."
Stephen also blasted Facebook’s early algorithms, which he said were designed to "maximise engagement" but ended up amplifying negative emotions such as anger, shock, and horror.
He said: "We are decidedly hopeless at knowing where technology will take us or what it will do to us."
During his hour-long lecture, the comic and actor also turned his attention to artificial intelligence, arguing AI is "poised to disrupt every space we have".
He urged tech developers to prioritise humanity over corporate greed, saying: "We appeal as human beings to human beings, remember your humanity and forget the rest."
Stephen's remarks were not the only criticism of Musk that day.
Speaking at Chatham House, Meta executive Sir Nick Clegg called X a "tiny, elite, news-obsessed, politics-obsessed app" and described it as Musk's "one-man hyper-partisan hobby horse."