One of the solutions would be to set rules with them from an early age. In general, children should not enter the bedroom of the parents without permission. Forcing them to knock before entering, having a bed that does not creak and a door that closes (with a lock) could already remove a thorn from your foot.
The bedroom of the parents constitutes a place of intimacy which belongs to them and to which children must not have access. It is necessary for them to understand that their parents also need to live their sexuality without being accountable. These are moments that belong to them.
When can you be quiet? When the children sleep, whether at school or at a friend's house. You can also give them to friends, family, to be able to find yourself in couple without risking being disturbed.
The important thing about these intimate moments is first and foremost to have your own space and that your children do not be in your paws.