Without any kind of ego, I have to say that I get complimented on my writing fairly often. Full disclaimer: many of these compliments come from my writing group, and my friends/ coworkers/ acquaintances. Some have come from teachers and instructors, staff at a writing school, and mentor-writers.
It has taken me a long time to learn how to accept a compliment.
Here's what I do:
1) Blush - I can't help it. I just never grew out of blushing. In fact, I started blushing in my teens and never grew back out of it. If you don't blush, try just taking a breath. Pause and let what was said sink in.
2) Say "Oh come on" or some variant of this - This is my natural instinct. I'm self-deprecating by nature. Rather than taking the popular advice of being a braggart, I've stuck with this instinct and, as a result, people have often commented on how humble I am. Note: When I need to be, I am very assertive. Kinda have to be in my day job.
3) Say "Thank you" - Accept the compliment. After that initial hesitation, which as I indicate, I can't really keep myself from making, I can take the praise at face value and let it warm me up.
For many people, skipping the second step feels more natural. If that's the case, great. If you're an introvert like me, try this. It often leads to a more fulsome conversation about writing in general and eventually, you can stop blushing.