A Swedish man who was joyriding in a shopping trolley down a steep road in Sydney's east overnight died when the out-of-control trolley struck a car at high speed and the man was catapulted into the gutter, police say.

The man's friend, who is also a Swedish national, was standing on the back of the trolley at the time of the crash and remains in Prince of Wales Hospital in a serious but stable condition following the collision on Coogee Bay Road in Randwick about 12.20am on Tuesday.

Police said the friends, both aged 28, were believed to be walking home when they found the abandoned shopping trolley and decided to ride it down a steep section of Coogee Bay Road. But their apparent plan to "have a bit of fun together" turned deadly, Chief Inspector Chris Stiles said.

He said the trolley was estimated to have reached speeds of up to 80km/h before it crossed to the incorrect side of the road near Coogee Bay Road's intersection with Judge Street. The trolley crashed into a car, which was travelling in the opposite direction at the sign posted 60km/h speed limit.