Before starting on nights, you are entitled to a free health assessment and regular (say, annual) health assessments thereafter. These checks would normally be medical examinations, but may be in the form of a questionnaire.
If your health is affected by nightwork you should, if it is possible, be offered alternative suitable day work.
If you are pregnant and have a certificate from your GP or midwife saying that it is necessary for your health and safety not to work nights, your employer should suspend you from nightwork for the period stated in the certificate. Your employer must offer suitable alternative day work on the same terms and conditions. If there is no suitable alternative day work, you should be suspended on full pay for as long as is needed to protect your health and safety.
You should not be forced to leave your night shift just because you are pregnant, where there is no medical evidence from a doctor or midwife stating that this is necessary.