How are you doing this cleansing diet? Is there a book, an author, a website, a forum, or anything that would serve as a guide? I myself would stop the diet if I had a headache that wouldn't go away. Then see if, by eating normally, the headache does go away. If it does, then it was caused by or exacerbated by the diet. Then, find out if that really is a diet that would be appropriate for you. There are thousands of diets. They all work, in the short-term, anyway.
Google will help a lot to find the experiences of others people who've done your variety of 'cleansing diet.'