They are these things:
https://www.senceive.com/tilt-sensors/triaxial-tilt-sensor-node
Used for monitoring track movement. Often installed wherre works near to or under the track are being done to make sure nothing is moving when it shouldn't be, or nothing is moving more than it should be as a result of known influences.
Also, well noted for every 5th sleeper - this places them approx at 3m intervals, which is the standard length used to check for twist faults. This means twist monitoring as well as individual monitoring for settlement is easy.