What about getting a 1/2" drill bit, and drilling completly through that section of the cap rail/deck edge? Then, using good old ziplock baggies (epoxy doesn't stick to them) you could 'plug' each end and fill it with epoxy. Let the epoxy dry, then you could drill/tap it for screws. The better plan would be to throughbolt the cleat, but there again, you could just drill right through that epoxy plug with no mess and no concern about crushing the foam.
Of course, using a 3/4" bit or larger is always good.. it's rather dependent on what amount of space is available in your work area.
Hopefully I did at least a halfway decent job of explaining that whole thing.. it's really quite simple.
... or I'm wrong.
Living aboard, currently in the Chesapeake
O'Day 37, still new to us