Microacoustic metagratings offer new ways to manipulate acoustic wavefronts, useful in flat lenses and high-frequency ultrasound imaging. Two-photon polymerization enables precise manufacturing at MHz frequencies, but increased thermoviscous effects at this scale cause significant losses. We propose two metagrating designs that refract waves at 2 MHz to -35 degrees, created using shape optimization with the linearized Navier-Stokes equations. Experimental evaluation with a capacitive micromachined ultrasonic transducer and optical microphone confirms the effectiveness of these designs, demonstrating successful manufacturing of microscopic acoustic metamaterials.