I don't think an English speaker would say the first sentence.
2 reasons - 1. exploding is not correct 2. you are talking about sleep not night - unless you are very unusual :-)
-My hair has been exploding at night.
Perhaps "My hair ends up going crazy during sleep"
-So, I have a habit of using my head band which keeps my messy hair pulled away tightly from my face.
*(I wanted to use this word 'updo' in this sentence. How would you say?)
- I don't think that your hair is naturally messy, that is something that happens at night. I don't think updo is a word - do up is the phrase.
so perhaps " I have a habit of using my head band to do up my hair and pull it away from my face during sleep."
I added "during sleep" because that is what I think that you intended.
-I guess that's why I have a migraine-like headache. (Good sentence !)