If you don't have flexible filament, you can use regular PLA instead, with a few extra steps. To curve the letterforms, dip in just-off-the-boil water for a few seconds, then lay the part on your hat.
Keep in mind that parts heat unevenly, and don't expect to get more than a general curve out of this step. This is not a precise process. =D
You may also have to drill out the sew holes with a small bit and rotary tool to enable the needles to pass through.