Part of the problem could be that your alarm is waking you up at a bad part of your sleep cycle. The times when you wake up more smoothly could be times when your alarm happens to sound during a phase when you are less deeply asleep. There are apps (like Sleep Cycle on the iPhone) and devices that track your sleep cycle and make the alarm go off at the appropriate part of your sleep cycle.
Part of the problem could be that your alarm is waking you up at a bad part of your sleep cycle. The times when you wake up more smoothly could be times when your alarm happens to sound during a phase when you are less deeply asleep. There are apps (like Sleep Cycle on the iPhone) and devices that track your sleep cycle and make the alarm go off at the appropriate part of your sleep cycle.