A fitness routine can be key to a good night’s rest. But too much exercise at the wrong time could can aggravate insomnia.