"And Samson went down to Timnah" (Judges 14:1), yet it is also written, "Behold, your father-in-law is going up to Timnah" (Genesis 38:13). Rabbi Elazar said: Of Samson, who was disgraced through her, going down is written; of Judah, who was elevated through her, going up is written. Rabbi Shmuel bar Nachmani said: There were two places called Timnah, one located on a descent and one located on an ascent. Rav Pappa said: There was a single Timnah; for one who came from this side it was an ascent, and for one who came from that side it was a descent.
Why Scripture Says Samson Went Down and Judah Went Up at Timnah
Yalkut Shimoni on Nach 69:5
וירד שמשון תמנתה וכתיב הנה חמיך עולה תמנתה. א"ר אלעזר שמשון שנתגנה בה כתיב ביה ירידה. יהודה שנתעלה בה כתיב ביה עליה. ר' שמואל בר נחמני אמר שתי תמנאות הוו חדא בירידה וחדא בעליה. רב פפא אמר חדא תמנת הואי. דאתי מהאי גיסא עליה ודאתי מהאי גיסא ירידה: