I would say both. But I would say sleep I think. This summer the wife and I were bad. Letting our daughter stay up rather late. She then sleeps in sometimes. Other times she gets up and then crawls into our bed, or tries to.
I think its a tie too. I mean for me I know how many hours I need to sleep if I want to wake up and not feel the need to smack a person bothering me for at least the first hour but then again sometimes shifts in life change what you need and what you want. There are other times when I can go to sleep at 4AM and wake up 4hrs later fine and dandy.
For me it is the routine. I really need to get to bed at the same time every night if I want to wake up and be fully rested. But that is just me. I can sleep 4 hours and be ok if my bed time is the same each night.