Relations do matter. They get more aggressive in this situation but they still won't try to attack a friendly.
I had the Malikim declare war on me when we were "Friendly."
I had boxed them in and there were few areas on the map for anyone to expand into and certainly none for them that could have maintained a border-integrity.
They declared war on me even though our relations were Friendly. We had long-standing trade, I always helped them and gave them things, here and there, to maintain a good "relationship." Later, I was hoping to vassalize them instead of having to go to war with them.
But, they do attack. Come to think of it, the Kuriotes attacked me as well later in the game. We also had Friendly relations and I wasn't the only Nation on the Kuriotes' border.
During both wars, both Nations still showed "Friendly" in their attitude despite being at war with them. I don't know if I have the saves during that time or not, I periodically delete that folder to clean it out. But, I can try to hunt through them if necessary.
(IIRC, two vassals of my current opponents, the major warring powers aside from myself, still show "Friendly" or some other positive description in their attitudes towards me even though we're at war. However, they are vassals and did not declare war upon me separate from their lieges. They were forced to because of vassalage. That's different than the Malakim and Kuriotes which did it independently.)