Electroencephalography (EEG) is an important clinical tool to capture sleep-wake cycling. It can also be used for grading injury, known as hypoxic-ischaemic encephalopathy(HIE), caused by lack of oxygen or blood to the brain during birth. Trac\'e alternant (TA) is a distinctive component of normal quiet sleep which consists of alternating periods of high-voltage activity (bursts) separated by lower-voltage activity (inter-bursts). This study presents an automated method to grade the severity of injury in HIE, using an automated method to first detect activity. The TA detector uses the output of an existing method to detect inter-bursts. Features are extracted from a processed output and then combined in a support vector machine (SVM). Next, we develop an HIE grading system using the TA detector by combining different features from the temporal organisation of the detected TA mask, again using an SVM. Training and testing for both models use a leave-one-baby-out cross-validation procedure, with model hyper-parameters selected from nested cross validations. The TA detector, tested on EEG from 71 healthy term neonates, has an accuracy of 79.1% (Cohen's \k{appa}=0.55). the grading system, tested on EEG from 54 term neonates in intensive care, has an accuracy of 81.5% (\k{appa}=0.74). These results validate how detecting the presence or absence of TA can be used to quantify the grade of HIE injury in neonatal EEG and open up the possibility of a clinically-meaningful grading system.