Youths pulled a sofa on to a railway line and sat by the track watching trains pass.
They were spotted by residents who tried to warn them of the danger.
When the teenagers refused to move they were told the police would be called.
Shoreham police went to the scene between Fishersgate and Southwick stations and found the youngsters had fled after throwing the sofa onto the track.
Railtrack and British Transport Police were informed and the power was switched off while the sofa was removed.
Inspector Chris Drew, of Shoreham police, said: "This was extremely dangerous and irresponsible behaviour.
"There could have been a very serious accident and lives could have been lost if a train had been derailed as a result of hitting the sofa.
"The youths also put themselves in danger of being electrocuted if they had touched the live rail."
Anyone with information is asked to call Shoreham police on 0845 6070999.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article