Is it better to work out in the morning or night?

A body in motion is always a better body at rest. But when is the best time to sweat it out?

Maybe a sweaty after-work spin class is what you need to get the kinks out. Or perhaps an 8 p.m. dumbbell session is more your style. Either way, evening workouts are more your speed. Perhaps, though, you’ve read or been told that working out at night is a prescription for a terrible night’s sleep.

Those against nightly exercising point out that it raises body temperature, increases heart rate and triggers the release of adrenaline. These effects, while typically desirable, inhibit our ability to wind down. They may also point to experiments involving mice, where prolonged periods of running during their nighttime (our daytime — mice are nocturnal) caused the rodents’ circadian rhythms to become unsettled, and their sleep unsound.

And yet, some say that as long as your evening workout gives you a proper cool-down, there’s no harm in it. So which side is correct?

Both, it seems.

Barbara Phillips, a University of Kentucky sleep medicine specialist, says the idea that exercising late in the day is bad for sleep was “always based on conjecture and anecdote.” Recent studies have found that exercising close to bedtime generally doesn’t screw with sleep quality. In a 2013 poll of 1,000 people, those who exercised at any point during the day slept better and felt more rested than those who didn’t. Only 3 percent of those polled indicated they slept worse after exercising close to bedtime.

In another study out of the University of South Carolina, young men with no sleep disorders were asked to ride stationary bikes for 3 hours and then go to sleep 30 minutes later. No issues falling or staying asleep were reported.

While some people may have a tough time falling asleep after exercising, it’s often not the physical exertion that’s responsible. Rather, other factors such as a busy mind rehashing a stressful day, a preexisting sleep disorder or a snoring partner are more likely to be the culprit.

That said, some studies have found that sleep benefits are greater when exercise takes place in the morning versus the evening. The main thought is that morning exercise has a greater influence on our circadian rhythms.

So, it’s simply a matter of listening to your body. Regardless of what time of day you workout, the positive correlation between exercise and sounder sleep has been well documented. In a survey of 150,000 people by the Centers for Disease Control and Prevention, 83 percent of vigorous exercisers reported very good or fairly good sleep quality, versus 56 percent of non-exercisers. A body in motion is always a better body at rest.