Sounds as though it was too strong or your skin reacted to a chemical ingredient and it has burnt/irritated the top most layer of the skin on your scalp. You might want to try using a type of natural moisturising type product on your scalp. In some pharmacies their are skin moisturisers made from natural vitamin E eg: avocado. You could gently rub this onto the affected area, then put a towel or cloth on your pillow and then use a gentle hair shampoo, perhaps one which is chemical free so as not to make the problem worse, until your skin gets to recover.
I have even hear of people using olive oil on their scalp to condition it. You could try this. It wouldn't be harmful anyway and olive oil is a natural source of vitamin E also, which is excellent for your skin. You don't have anything to lose so i would say it's worth a try.
Best of luck and hope you recover soon