Easy things first
The nose has structures called turbinates in them that engorge with blood when you lay flat.
They can cause congestion at night. One should first try flushing the nose with saline (there are a variety of otc solutions or even gentle sprays). This can help, if it doesnt then one can try the breathe right nasal strips. They can be quite effective. If it continues, then an ENT md will be helpful.