You need proper stretching, before a workout. A good warmup is necessary for a good training session, and a good stretch at the end is always beneficial for your muscles to relax at the end.
You must think about the things you've done aside from the physical work. Because sometimes when our mind work for hours non stop it could also make our body feel restless. Try to empty your mind and just relax for a minute or two.