Yep, atarax! Brandyn didn't sleep through until he was 14 months and would wake up screaming and bleeding from scratching his ears
I will tell you though that it has gotten SO much better now that he is older and we haven't used atarax in months!! I put quite a bit of aquaphor on his ears before bed. Another thing to consider is build up in the ears. The more skin in his ears the more he scratches at them. We are controlling it well now with mineral oil (a couple drops in each ear every other day) and seeing an ENT every 1-2 months.
All the best.. It's awful knowing they are uncomfortable and sleep deprivation is miserable too.