The Spirit of Yahweh came mightily on him, and he went down to Ashkelon, and struck thirty men of them, and took their spoil, and gave the changes [of clothing] to those who declared the riddle. His anger was kindled, and he went up to his father's house.
It was after Samson had paid his debt of 30 garments that the text says he became angry. The object of his wrath here was his "wife," not the Philistines. Samson did not intend to abandon his plan to marry the Timnite (Judges 15:1-2). He went back home to let his anger cool.