That will work until the pallets waterlog and then they will sink.

I built and anchored stacks of 4-5 pallets and tied them down with steel t-posts. I put them in deep enough that the top pallet remains submerged
during periods of low water. My pond is in the front yard and the Mrs. didn't want to look at pallets. If not for that I would have added two more to
each stack.

If you don't mind ugly you could use a piece of foam board insulation tethered to a cinder block. Pretty much anything that provides a submerged
horizontal-ish surface will be used by FHM for spawning - downed trees, dock floats, etc.