Andy
Many hobbyists install a perimeter fascia strip to the layout edge, often with control buttons for action accessories mounted on it and aligned with the accessories - handy for kids to use. My fascia boards are 1x3, painted Lionel orange and set 3/4-inch above the platform surface. Admittedly not very high, but I've never had a train fall to the floor. Photos attached.
Some operators install a protective barrier of clear plexiglas around the perimeter. Set about one foot high, It will keep a derailed train from falling to the floor, but its main function seems to be keeping curious fingers away from the passing trains. Effective, but IMHO somewhat off-putting. Keep WINDEX handy to wipe away fingerprints of the plexi.
I'm sure you'll get other helpful suggestions from Forum members.
Mike Mottler LCCA 12394