I have heard of this from many other people and sometimes I may even feel it a little bit. Yours is a bit different since it involves train tracks and not a bridge but the urge to jump is the same. I attached a link that may help explain what I'm referring to a bit better. Link I'm not sure if this is what you're experiencing or not but thought it may apply.
I sleep with my echo on playing either rainstorms or thunderstorms (I'm pretty sure they're the same). If you don't have one theres an app called Rain Rain and you can play different nature and/or white noise sounds, as well as make a combo of up to 3. So if you like Rain on a Tent but want some Thunder Cracks you can so both. You're also able to control the volume of each sound so if you want quite Thunder Cracks you can turn that sound down.
This is a good site to explore https://mynoise.net/noiseMachines.php
Having a completely dark room helps me a ton, alternatively I have a galaxy light I also LOVE.
My room needs to be cold so I can wrap myself into a burrito. The tighter the better (I read an article that this is actually something that is soothing, there is science behind it, I don't remember the science...sorry)
Reading until my eyes feel like they're going to fall out.
I cross stitch and its soothing, theres not a whole lot of thought that goes into it so my brain is able to slow down. Other ideas that might work for you could be knitting or crocheting, coloring etc.
Having a pre-bedtime routine has also helped a lot. In the past year I have made a lot of changes to help my sleeping habits and this is #1. Something as simple as brushing your teeth, using the bathroom 1 last time, taking meds (if applicable), then on noise machine, confirm alarms are set and burrito roll self.
Hopefully I haven't repeated anything anyone else has said!
Try Happyer
https://apps.apple.com/ca/app/happyer/id1537711110
https://play.google.com/store/apps/details?id=com.happyer4life
It will help you to be disciplined and stay focused. it's completely free also
I use Habitica, their catch phrase/title is gamify your tasks.
Works for me. But that all depends on if you set your mind to it or if you're a gamer of course.
There was a nail paint that was used when I couldn't stop as a kid.
Perhaps something like this: https://www.amazon.com/Biting-Deterrent-Biter-Be-Goner/dp/B079WCFLQB/ref=mp_s_a_1_4?keywords=finger+nail+bitter&qid=1573957038&sr=8-4
You must understand that you may end up replacing the nail biting with something else, perhaps doughnuts. Try to understand what this action is all about.
I like /u/mac4est 's answer.