Piece of string.
For each of our laptops, we encircle the joint between the laptop's display and its keyboard with a tight-ish double-loop of whipping twine, which then remains with the laptop. A brass screweye is at the back corner of the chart table (well past the 'splash zone') and with a short piece of small stuff laced thru the eye. When we bring out a laptop, the small stuff is secured to the loop. The laptop can only move a few inches in the roughest weather
After a couple of ocean crossings and multiple runs across Biscay, the Med and the Caribbean
each, I've come to believe the biggest threat to laptops on our boat
is a drippy watchstander with salty fingers who comes below to check email
or look at the electronic chart. (Well, and also a cup of coffee on the chart table). Mea culpa on all counts...