DS started sleepwalking, finally tracked it to the fact he was getting into a slightly shallower sleep and needed a wee.
He took a couple of months to get past it but now fully wakes when he needs the loo
Not sure if it will help in your situation but thought the reason might be the same.
hope dd is ok