I went through this myself right after giving birth.
I hate to be the bearer of bad news, but it lasted a long time—well over a year.
Those excruciating pains only subsided temporarily with injections—a mix of corticosteroids and some kind of painkiller, though I don't believe you should take them while breastfeeding. But even then, just a few days after the shots, everything would revert to the way it was before.
The pain was at its absolute worst in the evening. Once I finally laid down in bed, the agony would hit me so hard I wanted to scream. I couldn't find a single comfortable position. Moving around made it bearable, but the more I moved, the worse the pain became once things settled down. It was pure misery.
During those intense nightly episodes, what actually helped me was applying ice to the most painful spot, somewhere near my hip/buttock area. I would sit on those gel ice packs meant for lunch bags until the sensation subsided. Some people suggested heat, but for me, heat only made the pain worse.
Regarding medication, the only thing that provided relief was taking Advil several times a day, and only when combined with Normabel. That was the only way I could manage to fall asleep at night. Of course, that wasn't a real solution to the underlying issue.
My doctor pointed out that while these intense pains are occurring, I really need to slow down and rest more. Once the acute pain subsides, I should begin exercising. It was difficult to truly rest with a newborn, but I tried my best to minimize the strain. Fewer activities and less heavy lifting were always better. I truly hope you have someone who can step in and help you for a couple of weeks; believe me, you will feel reborn. In my case, moving back in with my mother helped immensely, and my suffering became much more manageable from then on.
Ultimately, the pain occurred less frequently over time. It only disappeared completely once I began exercising every single day, making sure to warm up first and finish with stretching. I am certain that is how I truly healed myself, because whenever I took a break, the pain returned immediately—it was less intense, but it hit the exact same spots in the exact same way.