Managed to get the custom maintenance page to display instead of the standard 503 page.
The R=503 in the RewriteRule line was making the standard 503 page display and this ignores the custom page reference.
This is the original line with the edited one below
RewriteRule .* maintenance-page.html [NC,L,R=503]
RewriteRule .* maintenance-page.html [NC,L]
Then the following lines were added at the very top of the custom maintenance page to set the 503 header and also an additional "Retry-After" header (choose the time you want in seconds) so the search engines know when to come back again. There must be no blank line above this code.
header('HTTP/1.1 503 Service Temporarily Unavailable',true,503);
header('Status: 503 Service Temporarily Unavailable');
The rest of the code for the maintenance page follows this.