The word "hell" in this text is from the Hebrew word "sheol" (שְׁאוֹל), and can mean grave, pit, or tomb. To make one's bed there, obviously, would be a euphemism for death or dying.
So the Psalmist is saying: "...if I go to my grave, you are there."
In effect, you are correct: it is essentially a poetic metaphor for death.
An interesting verse by which to compare it is found in Job, also using the same Hebrew word.
If I wait, the grave is mine house: I have made my bed in the
darkness. (Job 17:13, KJV)
In this couplet we also find the concept of making one's bed there in the grave (sheol).
Conclusion
The Hebrew word for "hell" (sheol) in Psalm 139:8 is a reference to the grave, and can be a euphemism for death.