Is it harmful to sleep for about 2-3 hours with contact lenses on?

Not usually. It does depend if they are rigid / non-permeable (which are uncommon) or soft / gas-permeable, which are designed to be worn for extended periods of time--including occasional naps. Check with your optometrist.