Some horses will lose their topline if they don't stay in training while others because of their conformation will cause it to be weak. Poor saddle fit can also be a cause of the loss of topline muscling. Here are some exercises that will help strengthen and build the horses topline.
Ground poles - you can trot with your horse in-hand over ground poles or lunge them over the poles. In the beginning you will only want to do this for 10 minutes. If you do this in-hand make sure your horse is used to the ground poles as you don't want them trying to jump over the poles. If you lunge the horse make sure you work both sides for five minutes each.
In the beginning leave the poles on the ground then after a few days raise them a few inches (5 – 8 inches) off of the ground. You will want to make sure you get the pole spacing right for your horse's gait.
Backing - this exercise when done properly will engage the horses back muscles. When backing the horse will need to have their head lower with a rounded back.
Belly lifts - this exercise is very beneficial for your horse. To do this exercise place your hands under the horse at the ventral sternum on the midline where the girth would be. Your hands will be side by side to each other with your fingers pointing up towards the spine. With your fingertips apply minimal pressure and run your hands back and forth to get the horse to raise their withers. Do your best to get them to hold this position for five seconds then move back a few inches so they raise their back and again hold for five seconds.
Gradually increase the time from five seconds on up to thirty seconds over a period of several days. Warning: If your horse has never experienced this before be careful and go slowly as some horses will try to kick you. Don't use a lot of pressure if it is not needed and make sure your horse is relaxed.
Hill work -for this exercise find a hill that is not steep. Start out by asking your horse to go up and down the hill at a walk. In the beginning you will only want to have them do this for about five minutes after a week you can then increase the time to ten minutes and build up to fifteen minutes. As the horse gets stronger try it at a trot, but limit your hill work as it can be very hard on the hocks. The proper way to do this is to make sure your horse's head is down which will lift their back.
Before starting any of these exercises, it would be best to warm your horse up first by doing some stretching. Using a carrot or grain have the horse stretch their neck to their sides do this stretch on both sides. Next have the horse stretch down to their feet and when they can do that then start working your way beyond the fetlocks to encourage the horse to lift their withers and back.
These exercises work great if done correctly and you're consistent with them. The horse must learn to go long and low which will develop their hip and abdominal muscles and will strengthen the back.