Homophones are common in English as well: the only way to distinguish 'sight/site/cite' is through context, for example. Unfortunately, even taking into account its use of tones, Chinese has a limited range of sounds, so these kinds of situation are more common.
As for 睡觉, it might help to know that, as with many mandarin 2-character words, one of them is sometimes used as a 'shorthand' for the full word. In this case, it is 睡 shuì: e.g. "让他睡个够吧" ràng tā shuì ge gòu ba. 'Let him have his sleep'. As far as I know, 觉 jiào is not used like this. Perhaps because that character it has so many other pronunciations and meanings, though that's speculation.