Not to be a killjoy, but it is technically illegal to walk on railroad tracks. In fact, railroads are private property, unlike public trails, roads, or waterways. They are owned by the railroad that operates them.
Every time you walk on them without permission, except at grade crossings, you are technically trespassing. It can be extremely dangerous to walk, run, or drive down the railroad tracks or even alongside them.
You’ve been warned. Do so ay your own risk!