I think that Letizia and Sofia's relationship is cordial, they are not the best of friends but they seem to have gotten closer lately. Letizia has a better relationship with her mother-in-law than with her sisters-in-law.
Felipe adores his mother and he must have been the bridge between mother-in-law and daughter-in-law.
Letizia's tenure as queen has been for the most part in Sofia's shadow and that ought to be uncomfortable for her.
Many people in Spain, especially some right-wing conservatives, frown upon Letizia because of her humble family origin and because she was a professional woman, divorced, allegedly a republican and an atheist, etc. etc. She is also seen as a "modern", progressive woman, which also annoys some conservatives.
In many ways, Sofia is the opposite to Letizia: politically and socially conservative, religious, with an impeccable family tree (a King's daughter descending from the Danish, British, Prussian, Hanoverian, and Russian royal houses), and was even willing to put up with an unfaithful husband for the sake of the Crown. Inevitably we see many Spaniards often comparing the two queens, from the way they dress and the jewelry they wear to how they behave in public events, state visits, etc. In those comparisons, many Spaniards are unkind to Letizia on social media saying she lacks manners, is not fit to be a queen, is rude and arrogant, or is simply not a "true queen" like Sofia, that Felipe should have chosen a better bride etc. etc.
If you were in Letizia's shoes, wouldn't you be hurt or at least annoyed by those recurring comments? I can't help thinking that might have an impact on her relationship with her mother-in-law.