How do you get sandfly bites to stop hurting?

Multiple remedies. Sand fly bites can be extremely itchy. There are many remedies that can be tried including a paste of baking soda and water spread over the bite area, tea tree oil placed on the bites and aloe vera. Over the counter medications such as topical Hydrocortisone cream and oral antihistamines can also be tried. To prevent bites, use natural tea tree or coconut oil or repellents containing deet.
Antihistimines? I would avoid scratching, which may lead to infection. Ice might help. I would try low dose benedryl, over the counter, like 25 mgs every 6 hours as long as you can tolerate this. Over the counter steroids like Hydrocortisone may also help. I would avoid topical benedryl preparations as they can make things worse. Good luck.