Police in Western Australia's Great Southern have been left dumbstruck after two friends hatched an alcohol-fuelled plan to ride on top of a grain train from Albany on the state's south coast to Perth.

The train was forced to stop in the small farming town of Cranbrook about 100 kilometres north of Albany, after drivers were alerted to two men on top of a carriage about 3am on Saturday morning.

Cranbrook Police Sergeant Laurie Seton said the duo were worse for wear after only making it a quarter of the way to their intended destination.

"I really don't know what was going through their heads," he said.

"When they got off the train they had no idea where they were, they'd been sitting on the train for over two hours, they were both very cold, very filthy and a lot more sober than when they'd got on it."

Police say the two men spent more two hours on a CBH freight train. The railway line is busy after the state's grain harvest recently wrapped up. ( ABC: Kit Mochan )

Offenders 'lucky to be alive'

Sergeant Seton said the two men had held up the grain delivery, which was being conducted by the state's main grain handler CBH.

"[The drivers] sighted two young blokes riding on top of the train, so of course that brings the train to a complete halt until they can locate the guys and get them safely off."

After being rescued by police, the two 20-year old men from Albany had to wait for a lift home.

CBH Albany Port Zone Manager Greg Thornton said the men were lucky to escape with only a hangover.

"On this occasion they're two very, very lucky people," he said.

"Even when the train is stationary you don't know when it is going to move because due to the length of the train the driver can be a kilometre away."

Grain harvest wrapped up earlier this year in the state, with an estimated 14.2 million tonnes harvested by farmers.

Stowaways not unheard of

Although stowaways were an unusual thing for grain handlers to deal with, Mr Thornton said it was not unheard of.

"It's not one we have a lot of trouble with but we have in the past had people climb through the wagons," he said.

Police were still determining what the offenders would be charged with.

"We're still working on that, there will be a charge specific to trespassing on railway property but they will be summoned in the next week or two," Sergeant Seton said.

CBH were awaiting the outcome of a police report before deciding on any further action, but had a message for anyone considering hopping aboard one of their grain trains.

"Climbing in between the wagons or riding on the wagons is very dangerous and can result in really serious injuries," Mr Thornton said.