Do military pilots have flight & rest hours regulation?
Yes, they do. My experience is with the U.S. Air Force, so my answer will be from that perspective, but other air arms have similar regulations.

USAF

From the 11-202V3, Chapter 9, Crew Rest, Fatigue Management and Flight Duty Limitations:

9.4.3 Augmented Aircrew


  A basic aircrew supplemented by additional aircrew members to permit in-flight rest periods IAW paragraph 9.4.8. If the basic aircrew requires only one pilot and a second qualified pilot (includes pilots enrolled in an AETC formal aircrew
  training course) is designated an aircrew member to augment pilot duties, the crew can be considered augmented.


9.4.6 Flight Duty Period


  FDP begins when an aircrew member reports for a mission, briefing, or other official duty and ends when engines are shut down at the end of the mission, mission leg, or a series of missions. FDP for UAS ends at final engine shut down, final in-flight handover briefing, or final crew swap, whichever occurs last.


Table 9.1 (Maximum Flight Duty Period in hours by aircraft type)
 

9.8 Crew Rest


  Aircrew require at least 10 continuous hours of restful activities (including an
  opportunity for at least 8 hours of uninterrupted sleep) during the 12 hours immediately prior to the FDP. To ensure individual accountability and mission reliability, crewmembers should be officially notified prior to entering a crew rest period. A crew rest period cannot begin until after the completion of official duties.


So you can see from the chart that it depends on the type of aircraft, and the number of qualified pilots on board. But there are of course exceptions (e.g. the B-2 Spirit has been known to fly missions up to 44.3 hours), especially in wartime. All Air Force flights' risk is determined prior to the mission, and in training things like crew rest are instant no-flys, but when the needs of the mission dictate, pilots may have to overfly when they are the only or best option, or when exceptional circumstances dictate.

Also, from the Navy (I searched for other regulatory publications from other countries, but couldn't find any):

US Navy

From the OPNAVINST 3710.7T Chapter 8:

8.3.2.1.2 Flight Crew


  Ground time between flight operations should be sufficient to allow flight crew to eat and obtain at least 8 hours of uninterrupted rest. Flight crew should not be scheduled for continuous alert and/or flight duty (required awake) in excess of 18 hours. If it becomes necessary to exceed the 18-hour rule, 15 hours of continuous off-duty time shall be provided.


8.3.2.2.a Flight Time


  Daily flight time should not normally exceed three flights or 6-1/2 total hours flight time for flight personnel of single-piloted aircraft. Individual flight time for flight personnel of other aircraft should not normally exceed 12 hours. The limitations assume an average requirement of 4 hours ground time for briefing and debriefing