It's easy to use good form on push-ups... until you start to fatigue. Instinctively, we try to make it easy to keep going by sagging the hips. This effectively lightens the load and shortens the range of motion. But of course that's incredibly bad form too.
To fix it fast, simply bring one knee up to touch the same-side elbow. That puts you back into correct alignment. Now, keep that form and continue to do reps.
If you're unsure about your starting hip position, just use this same cue before beginning a set.