'왜냐 하면' literally means "If (you) ask why" and is used at the beginning of a sentence to introduce the reason for something or start off an explanation. Think of it more as a conversational tool rather than a grammatical element per se. The explanation itself would still end in something like '-(으)니까', '-거든', '때문에', etc.
Q: 오늘 왜 이렇게 피곤해 보여? (Why do you look so tired today?)
A: 왜냐 하면, 어제 많이 못 잤으니까... (Because I didn't sleep much yesterday...)
The '왜냐 하면' part is completely optional but works as a cue to let the listener know you're about to provide an explanation.
This goes beyond your original question but for "Because I didn't sleep well" all of the following are possible but the nuance is slight different:
잘 못 잤으니까 (this has a sense of I find myself tired because I didn't sleep well/enough)
잘 못 잤거든 ('-거든' here has a stronger sense of offering an explanation)
잘 못 자서 (this has a sense of logical consequence)
잘 못 잤기 때문에 (this is a vanilla 'because' and sounds rather matter-of-fact)
I suppose there are other ways, as well, but these immediately come to mind.