You can say both (almost); which one you should choose depends on the context.
Example:
Say you slept poorly on Sunday night. It's Monday morning, say 8am, and someone (maybe your mum) is nagging you to get up. In that instance you would say "I have only slept 5 hours. I have to sleep more!" (or rather "I need more sleep!").