The hat got wet and went all floppy.

Literal

Hat [subject-が] got-wet-[sequential-て] floppy [became-になった]

ふにゃふにゃ is a 擬態語 (state mimetic) for something soft, limp, or flaccid — the texture of a waterlogged cardboard or a collapsing gelatinous thing. Japanese has dozens of texture mimetics (ぐにゃぐにゃ similar but more rubbery, べろべろ licked-floppy, etc.) that English would need adjectives for.