It does not hurt anything at all. They are designed for that.
How new is your machine? The newer machines go into a deep sleep mode after three hours and use very little power. The new Macbook Airs can run up to 30 days asleep on battery power this way.