This is a tough one. Arriving at midnight and leaving at 10:00 am or thereabouts makes a long stay in the F lounge (it is a nice experience, but it doesn't offer private cabanas like BA does at Heathrow and other airlines). The best you can do at DXB is the 'quiet room', which is a rather large, fairly dark and quiet, with lounges and lay-flat davenports (is that what they are called?). It isn't all that private, frankly.
A second option is going into town in the middle of the night to experience Dubai. I have to say that going into town at 1:00 or 2:00 am and returning at 7:00 or 8:00 isn't the best plan.
The third option is checking into a hotel for a short stay. I transited DXB last month in F with an 16 hour layover - in that case, a hotel made sense. I would truly question whether anything shorter than that does.
I've done 8-10 hour transits in the F lounge 3-4 times. While they aren't necessarily the best in terms of seeing stuff, that is about all one can reasonably do in that time frame.
Bottom line - I'd recommend staying in the F lounge for your transfer.