Is it bad to keep hydraulic brakes engaged for many hours? I find it easier to park my bike if I can remove one of its degrees of freedom, for example, prevent the wheels from rotating. An easy way to do this would be to strap one of the brake levers down.

This would be for around 8–12 hours, 5–6 times per week. I have hydraulic disc brakes. The bike would be upright.

I have a feeling that this is a bad idea. Is it? And if so, why?
Short answer?  No, it will not generally cause you a problem.  This is actually a common method of parking a loaded touring bike.

Don't over tension the brake lever.  Remember that a hydraulic lever doesn't require excessive force to have power at the brake. 

A simple 6mm rubberband wrapped over the lever and handlebar should accomplish your purpose.