I am travelling from Jeddah to Dubai on flydubai and will stay 5 hours in transit in terminal 2. I need to rest in the airport hotel for a couple of hours. Is there a hotel in terminal 2? If not, what is the nearest hotel and how can I reach it?
As for staying at the Dubai Airport, if you are in terminal 2, you're stuck.
Terminal 2 does have a small food court, comprising of KFC, McDonald's and an Indian restaurant, couple of coffee shops and subway. A small duty free is present in departure terminal. Airport lounge is available for Fly Dubai passengers but not sure if it is only for Business class passengers. So if you are arriving in this terminal or getting transferred to here you have nothing much to do, sit and relax.
It's boring and not connected to the other terminals. If you are in Terminal 1 or 3 (or the terminal 3 Concourse), there is much more to do. Terminal 1 and Terminal 3 are physically connected.
You can walk from the start of one to the end of the other. Terminal 3 is significantly newer, with more shops, cafes and restaurants. The Terminal 3 Concourse is the newest part of the airport.
You need to take a quick train trip to get there from terminal 3. It has a wide variety of restaurants and shops. My personal food favorite is Shake Shack, an outlet of the upscale 'Hamburger joint' from New York. But there is lots to choose from. There are also spas and a terminal hotel you could make use of.