L.D.
There are a couple of reason why your daughter may be doing this.
Possible Reason #1: When she does it, she gets your attention and possibly that has become some kind of game for her. If that's the case then, if you ignore the behavior, it will evenutally go away.
Possible Reason #2: She is experiencing some frustration and that's how she is dealing with it right now. A likely source of frustration may be that she needs something but is not able to tell you because her ability to communicate are not that well developed yet. If that's the case, you will need to pay attention too see what's causing her frustration and "give her the words" to say to help her get her needs met.
Possible Reason #3: This is most likely not the case with your daughter but there are children who have a sensory processing disorder (SPD). Some of those kids have a sluggish mind and they sometimes hit their head with their hands or against the wall to get themselves to wake up. The odds of this being a problem are slight but I thought I would put it out there just in case.