Replacing V berth foam material
I used 3M 77. Easy to find and has very high tack. Spray both surfaces, let dry a few minutes until the glue is tacky, then stick together. You might have to keep applying pressure for a few minutes to a few places that separate but it will eventually hold.
Sabre 38 "Victoria"