@RSJB18 posted:Looks like foam pipe insulation to me.
Yep, that's exactly what I used -- fairly cheap in the 3 to 4 foot length multi-packs at any hardware store, and recently I've seen it in longer lengths (6-8 feet or so?), which can reduce the number of seams needed. It easily opens up to grip the edge of the layout firmly, and can be removed and reinstalled as often as needed. The only problem is that, as you might expect, it prefers to go straight, but if you have at least a foot or two on either side of a sharp curve, it will usually hold well enough on its own. In a pinch, though, a strategically placed staple or two will keep it in place, though that makes it a bit more work to remove and reinstall.
I've successfully used it over plain half-inch plywood or, as shown in the pics, over half inch foam on top of half inch OSB -- the combined inch thickness is (literally!) a bit of a stretch, but still does well, protecting young visitors from enthusiastic encounters with the edges of your layout, while concealing the raw edges of your carpentry work and looking almost purpose-made for the use. My only other suggestion would be to buy all your anticipated needs at one go -- there are small but somewhat noticeable color variations from batch to batch.