Atopic dermatitis is a chronic inflammatory skin condition affecting both children and adults and is associated with pruritus. A method for objectively quantifying nocturnal scratching events could aid in the development of therapies for atopic dermatitis and other pruritic disorders. High-resolution wrist actigraphy (three-dimensional accelerometer sensors sampled at 20Hz) is a noninvasive method to record movement. This paper presents an algorithm to detect nocturnal scratching events based on actigraphy data. The twofold process consists of segmenting the data into "no motion," "single handed motion," and "both handed motion" followed by discriminating motion segments into scratching and other motion using a bidirectional recurrent neural network classifier. The performance was compared against manually scored infrared video data collected from 24 subjects (6 healthy controls and 18 atopic dermatitis patients) demonstrating an score of 0.68 and a rank correlation of 0.945. The algorithm clearly outperformed a published reference method based on wrist actigraphy ( score of 0.09 and a rank correlation of 0.466). The results suggest that scratching movements can be discriminated from other nocturnal movements accurately.