If your grater becomes dull mid-task, try grating against the grain, using a different part of the grater, or sharpening it with aluminum foil.
A dull grater can be frustrating, but there are a few things you can do to improve its performance without stopping to fully sharpen it. First, try grating against the grain of the food. This can sometimes catch on the slightly sharper edges of the grating holes. Second, if your grater has multiple grating surfaces, switch to a different one. Some surfaces might be less worn than others. Finally, a quick and easy trick is to fold a piece of aluminum foil several times to create a thick pad. Then, grate the foil pad against the grater, using the same motion you would use for food. The aluminum can help to hone the edges of the grater slightly.
To prevent your grater from dulling quickly, avoid putting it in the dishwasher. Hand washing is gentler and will help preserve the sharpness of the blades.