I've been having this exact problem with my 8yr old daughter for a year now, and it's very infuriating, she can sometimes be awake at 11-12pm, and it was so bad it was happening every night.
She is a worrier by nature, so if she was awake late then she worried about it being late, then she 'can't' sleep because she worried about that, it usually ended with her getting herself in a state and us shouting at her.We tried everything , even involving Gp but nothing worked.
Until, she had an invite to go to her friends house after school, I told her if she messed us about going to sleep then she wouldn't be allowed to go, so for 2 weeks she went to sleep beautifully.
3 days after she'd been, the going to sleep shenanigans started again.
So this is how we work it now, she messes us about, she doesn't go somewhere that was planned or gets use of PC etc taken away.
It works...everytime.
One thing I will add is my Ds goes up to bed at 7 every night, we tried letting her stay up later but if we do then shes later going to sleep, so DD goes to bed same time as Ds but is allowed to read for half an hour before going to sleep, then I go in turn her lamp off and thats sleep-time, she is asleep by 8.30 most nights now. If she calls out ,gets in a state after that we ignore, if it carries on then she has one last warning and then she has something taken away.
Tough but it's the only thing that works.