You can do it, but be aware the hotel shuttles at ORD don't run super frequently late at night, and even at bizarre hours they are subject to freakish traffic delays around the airport.
I wouldn't really recommend staying at an ORD-area hotel if your main goal is to hang out downtown and enjoy your stay. Plenty of reasonably priced in-town hotels you can Priceline. JMHO.