Maybe. Maybe not. Take the case of a young man who was suffering from frequent nighttime urination. He would have to get up several times a night to go to the bathroom -- something that's very uncommon in somebody in his 30's. After weeks of very interrupted sleep, he visited a urologist, who, in addition to performing multiple tests, suggested that maybe it wasn't his bladder that was waking him up. Perhaps it was something else --noise, for instance-- that was waking him up, and when he woke up, he felt that he had to go to the bathroom. In other words, the cause of this man's sleepless nights might not have been what he thought it was. An indeed, once he had an idea of what to look for, he did just that and found that every time his girlfriend turned over in bed, she pulled the blanket and that was what woke him up.
The lesson of this story is that it may take some investigation to figure out why you're not sleeping well. (And it's also possible that there's more than one cause for sleeplessness.) Don't just assume that your first guess is the right guess.