Because without physical activity, the body has extra "energy" if you will, and so when it is time for bed you are not tired, so you end up staying up all night. also there is probably an effect on your internal clock, which messes with your melatonin production which goes hand in hand with your sleep cycle