Same with my daughter everynight she comes to my bed she just turned 12 2days ago
A mother-daughter relationship is not always comfort and emotional.
At 12 years old, your daughter is in puberty and is dealing with homone changes alone. She's probably scared.
She's experiencing things she doesn't know how to deal with.
She needs to have a woman to talk to about personal girl stuff.
Lacking that, she seeks comfort from you because she trusts you and loves you.
I'm not sure of your situation.
Perhaps an aunt or close family woman friend can talk with her.
It will need to be someone she trusts, a woman not a school age friend.
You might ask if she has any friends mothers that she trusts, perhaps she could talk with her?
There are also crisis hotlines that might give her comfort and direction.
Church? Child outreach groups? and yes, professional counselors. However, professional counselors may be the extreme route if her personality is normal.
There are some issues you might be able to help her with as a father but there are some that will have to be handled by a caring woman. Encourage her to talk with you. If you don't know, be honest and tell her you don't know but make an effort to find out. Use the internet, talk to female co-workers and friends. Then, get back to her about it.
When she comes to your room at night, gently take her hand and take her back to her room and sit with her. Pay attention to what she says, even if you are sleepy. Put her at ease so she can get back to sleep.
Its part of being a parent, child care is not a part-time job.