Firstly you must remember to have a visa. If you do not, I know you can get one in HK
(TST, China travels, opposite Sheraton hotel), or just pop into any hotel travel desk. They are usually helpfull. I am shure you can find the same service in Macau.
I suggest that you spend the night in Macau and advance to Shenzen in the afternoon. I strongly recoment the bus service, At the Shenzen Bus station, you will find a lot of people whom can help you with hotel etc. Arriving in Shenzen at 3-4 am is not a good idea.
If you want to save the money, you might as well spend an hour or two in the airport, and catching the first bus to Shenzen in the morning.
Happy hunting