For starters, let me restate the first line of your question
A study was created to test the effects of jazz on people's sleep patterns
Just from this we can extract all the information we need in order to determine the dependent variable in this study.
Let me quickly define what a dependent variable is.
So back to the example.
Researchers want to test on people's sleep patterns. This is their main focus of the study. What are they trying to test about people's sleep patterns? Well, they want to see in which ways does jazz music affect people's sleep patterns. Something is affecting something else. Jazz music is affecting or they are trying to see if it does indeed affect people's sleep patterns.