Deployments tend to be by ship, rather than branch. Ships can be deployed operationally for up to six months continuous but anyone deployed over this length of time (typically up to 9 months) will take two weeks mid-deployment leave (at the 4.5 month stage), funded by the service if this involves flights home and back. On average, you can expect to deploy every other year when serving on a ship, but the reality is closer to one deployment every three years throughout an average career.
Where possible, unit Commanding Officers will grant pre-deployment leave and all annual leave due during the period of deployment will usually be taken before or after deployment. In exceptional circumstances, where operationally feasible (availability of routine trooping flights) sometimes leave can be taken locally whilst deployed. Submarines usually deploy on routine patrols of about 12 weeks a year for each crew, sometimes people will deploy twice in one calendar year. Ships sometimes stay in theatre overseas and rotate the crews (Ship’s Company).
The 12 weeks a year for each crew part with regards submarines only apply to bombers in the patrol cycle who have 2 crews. SSN's only have the one ships company but have a 5th watch so the ships company can rotate, same as surface ships.